-
Notifications
You must be signed in to change notification settings - Fork 192
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
Parameters schema validation: allow oneOf, anyOf and allOf with required
#3386
Parameters schema validation: allow oneOf, anyOf and allOf with required
#3386
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a lot of repeated code. Can we maybe handle all three cases in one abstract way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also maybe tests for all of these?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files☔ View full report in Codecov by Sentry. |
Tests added ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
I found a case where we were using the following schema structure:
This was failing because our listing wasn't removing the
required
instances inside theoneOf
when validating default parameter values.This PR allows having these cases and also prints the complete error message on debug mode, as the
e.message
text was not helpful in identifying the problem.