-
Notifications
You must be signed in to change notification settings - Fork 158
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: false positive errors when validating examples with refs #1377
fix: false positive errors when validating examples with refs #1377
Conversation
🦋 Changeset detectedLatest commit: d764eb9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Coverage report
Test suite run success671 tests passing in 94 suites. Report generated by 🧪jest coverage report action from d764eb9 |
e34407e
to
7ccb641
Compare
aca85c2
to
cefc041
Compare
cefc041
to
dbd2f99
Compare
.changeset/small-rules-vanish.md
Outdated
"@redocly/cli": patch | ||
--- | ||
|
||
Fixed false positive errors when validating media type examples that contain references. |
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.
So that I understand this properly: we fixed a problem where no errors were reported - but the examples were wrong? So users might see errors without changing their API description, is that correct? Was it specifically when the changes went across files?
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.
So users might see errors without changing their API description, is that correct?
Actually vice versa. We show an error when there's no error (due to wrong references caching). After the update, false errors should be gone.
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.
OK let's update the changelog entry to describe what the user might experience.
08e9ad8
to
b7b58f6
Compare
b7b58f6
to
5532e55
Compare
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.
I checked the ajv code and our code again.
This looks like it should not break anything! 🎉
Let's merge.
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.
Really happy to get this sorted out. Thanks!
Co-authored-by: Lorna Jane Mitchell <[email protected]>
What/Why/How?
This solves an edge case validation error when there are multiple references in media type examples and the corresponding schemas.
Reference
Fixes #1245
Testing
Screenshots (optional)
Check yourself
Security