Skip to content

Remove duplicate response errors for unions #1167

@markcowl

Description

@markcowl

Implementation issue for #1012

Remove the duplicate error response that occurs when response unions do not include different content-type headers or response status codes for each variant.

model A { x: 1 }
model B { y: 1 }
op foo(): A | B ;

Make sure to consider cases in which some variants do have different response status codes or content-type header, so that the 200 response should be a union and error / other status code responses should be preserved:

For example

model A { x: 1 }
model B { y: 1 }
model C { @statusCode code: 201; z: 1 }
op foo(): A | B | C;

or

model A { x: 1 }
@error model B { y: 1 }
model C { z: 1 }
op foo(): A | B | C;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions