-
Couldn't load subscription status.
- Fork 14
IPA 106: Create : The response status code must be 201 Created #527
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
| if (isCustomMethodIdentifier(resourcePath)) { | ||
| return; | ||
| } |
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.
Q: Should be skip non-resource collection paths as well?
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 have also been thinking about it lately. Because in IPAs, it is mentioned that make a POST request to a collection's URI. It makes sense to skip non-resource collection paths. I will share another PR refactoring the Create methods with that check
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.
Cool, yeah then I think we can discard some of the paths that are /resource/resource which may be more of custom cases
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.
Yeah I think so
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 made the changes for this rule on this PR. For others: #529
Proposed changes
Jira ticket: CLOUDP-304941
Create methods must return a 201 Created response code
Checklist
Changes to Spectral
Further comments