Nexmo / oas_parser

An open source Open API Spec 3 Definition Parser
MIT License
51 stars 16 forks source link

Add parameter to fall back to "default" response #27

Closed ahx closed 5 years ago

ahx commented 5 years ago

Calling Endpoint#response_by_code('422', use_default: true) returns the "default" response if it was defined in the spec. use_default is false by default.

See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#fixed-fields-14 for a description about "default" responses.

mheap commented 5 years ago

Released as 0.18.0 - thanks!