Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of "examples" when validating examples #17

Open
handrews opened this issue May 22, 2023 · 2 comments
Open

Fix handling of "examples" when validating examples #17

handrews opened this issue May 22, 2023 · 2 comments
Labels
bug Something isn't working graph construction

Comments

@handrews
Copy link
Collaborator

handrews commented May 22, 2023

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

@handrews handrews changed the title Handle "$ref" under "examples" when validating examples Fix handling of "examples" when validating examples May 23, 2023
@handrews
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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?

@handrews handrews added bug Something isn't working graph construction labels May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working graph construction
Projects
None yet
Development

No branches or pull requests

1 participant