widdershins
widdershins copied to clipboard
Support multiple response types
Is your feature request related to a problem? Please describe.
Unable to properly define response schema's especially in the context of multiple response content-types.
Describe the solution you'd like
The response table should display a response for each content-type
.
Valid OpenAPI3 specification:
"responses": {
"200": {
"description": "Foo",
"content": {
"application/json": {
"schema": {
"type": "object"
}
},
"application/pdf": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
},
Actual output:
- Note that
string
is entirely incorrect for any of these response types. https://github.com/Mermade/widdershins/issues/437
|Status|Meaning|Description|Schema|
|---|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Foo|string|
Expected output:
|Type|Status|Meaning|Description|Schema|
|---|---|---|---|
|application/json|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Foo|object|
|application/pdf|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Foo|string(binary)|