Closed elyesbenabdelkader closed 5 years ago
This PR fixes issue #181 According to the OpenAPI v2.0 Specifications*, response examples have to be defined in a 'examples' field, not 'example'. Furthermore, an example must be an Example Object**.
* https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#response-object ** https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#example-object
Nice work!
I'll merge this, but will replace this condition so we can keep backward compatibility:
if (value.example) { return value.example;
This PR fixes issue #181 According to the OpenAPI v2.0 Specifications*, response examples have to be defined in a 'examples' field, not 'example'. Furthermore, an example must be an Example Object**.
* https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#response-object ** https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#example-object