Skip to content

fix: oas compliance in response schemas #221

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

walker-tx
Copy link

This PR:

  • Removes $id fields from the various places that they were popping up
  • Parses Model[] schema names to:
{ 
  "type": "array",
  "items": { "$ref": "#/components/schemas/Model" }
}
  • Adds a test to check for OAS validity when the spec has component/schemas in it

@Lolotronop
Copy link

This seems like a generally better written and considered version of my "small additions" to the #219, it should be merged instead of my changes on that for sure, tho standalone validator support portion of that still stands. Probably should have filed those as separate PRs, but oh well. Thanks for doing this!
Your versions also does rewrite the code path with the good old if statements instead of that nasty giant ternary, which is nice. I didn't do that to not break out of the general code style, it seems like Aom likes these ternaries for some reason. Or doesn't care enough to refactor them when they get to big. Either is fine, but yeah :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants