Handle default error response
aej opened this issue · comments
Hi, thanks for creating such a great library.
I came across a situation where an openapi schema contains a default response to cover all error cases. Quoting from here
You can use the default response to describe these errors collectively, not individually. “Default” means this response is used for all HTTP codes that are not covered individually for this operation.
I think it would be useful to support this in the generator as a special-case - so perhaps the operations.responses
object could be in the form
[
{200, {ResponseSchemaFoo, :t}},
{:default, {ResponseSchemaBar, :t}}
]
That will allow users to handle the default in their Client
library.