-
Notifications
You must be signed in to change notification settings - Fork 14
CLOUDP-304963: IPA-114: Errors (check for 404 codes for parameterized endpoints) #640
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
| is not found. | ||
| message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-114-parameterized-paths-have-not-found' | ||
| severity: warn | ||
| given: '$.paths[*][get,put,post,delete,options,head,patch,trace]' |
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.
[Outside PR] Delete has it's own rule covering 404. If if introduce generic rule (which I think makes sense) we should remove dedicated 404 rule for delete. Is that planned? WDYT?
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.
[Question] Separately - what is the purpose of mentioning all of the methods here.
I guess you wanted to exclude exceptions? If yes the same filtering can be done in the code.
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.
Yes, I wanted to exclude exceptions and all the stuff other than HTTP verbs. I agree that it can be handled in the code, but it is widely used approach at the moment, so I followed it
We can remove the dedicated 404 rule for delete, as you said it will be covered by this one. I will share the PR for removing it in a separate PR, if that is okay
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.
Thank you.
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.
LGTM with follow up recommendation.
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 encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Proposed changes
Jira ticket: CLOUDP-304963
Checklist
Changes to Spectral
Further comments