OAI / oascomply

Apache License 2.0
21 stars 5 forks source link

Fix handling of `"examples"` when validating examples #17

Open handrews opened 1 year ago

handrews commented 1 year ago

Currently the code assumes whatever is under examples is the literal example, and won't handle a Reference Object correctly.

handrews commented 1 year ago

Actually, "examples" isn't done right at all for the moment - the schema annotations assume the wrong structure and don't handle the external example case at all

handrews commented 1 year ago

External examples for application/[*+]json should probably be loaded and validated like any other part of the API description. For other formats, probably not (except perhaps to check if a presumed binary payload is actually binary?