Dorthu / openapi3

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

Contact fields that should be optional are considered required, resulting in raised SpecError. #82

Closed kirypto closed 2 years ago

kirypto commented 2 years ago

When parsing a JSON spec, if the contact object is specified but missing any of name, url, or email, a SpecError is raised:

openapi3.errors.SpecError: Expected info.contact to be of type Contact, with required fields ['name', 'url', 'email']

As far as I can tell from research, all three of these fields are optional:

kirypto commented 2 years ago

I will note that I fairly new to open source contributions, so please let me know if there is anything more that should be provided.

Dorthu commented 2 years ago

Thanks for the report! I opened #83 to resolve this issue.