-
Notifications
You must be signed in to change notification settings - Fork 14
IPA-114: Errors (fix for exception level) #637
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
Conversation
| This rule checks that all 4xx and 5xx error responses reference the ApiError schema. | ||
| message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-114-error-responses-refer-to-api-error' | ||
| severity: warn | ||
| resolved: false |
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.
FYI this is probably why the external spec references don't work, since we're passing the unresolved spec
One option to consider could be to run the validation on the resolved spec, but when evaluating the object, use the passed unresolvedDocument to see the schema ref name
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.
Discussed offline. For now, we will proceed with the current approach, and for the API Registry violations, I will note down the limitation in the exception reason, and refer to the investigation ticket
Proposed changes
Jira ticket: CLOUDP-304960
Fixes:
(
openapi-api-registry.jsonrefers to schemas inopenapi-mms.json, which cannot be resolved in custom Spectral rule functions, therefore they will appear as errors)Checklist
Changes to Spectral
Further comments