Dorthu / openapi3

A Python3 OpenAPI 3 Spec Parser
BSD 3-Clause "New" or "Revised" License
118 stars 47 forks source link

"example" is being verified as str only #32

Open danielbraun89 opened 3 years ago

danielbraun89 commented 3 years ago

example fields can contain any media type: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#fixed-fields-10

but the validator will fail on any example in paths which is not string because of how 'example' field is handled in https://github.com/Dorthu/openapi3/blob/master/openapi3/paths.py

(note that example in paths can examples of responses too)