Dorthu / openapi3

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

new: Better errors when failing to parse type or ref #51

Closed Dorthu closed 3 years ago

Dorthu commented 3 years ago

This is for me.

The error for failing to parse an element that can be of a single type is good, but many things can be of a single type of a Reference; in those cases, it would still be useful to see what fields were required that were not found to satisfy the single type that was allowed (besides Reference).

This change unifies how Map and ObjectBase produce these errors, and improves the error in the above case.