-
Notifications
You must be signed in to change notification settings - Fork 14
CLOUDP 328960: OperationID Validation function for :action custom methods #815
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
| let obj; | ||
| if (input.post) { | ||
| obj = input.post; | ||
| } else if (input.get) { | ||
| obj = input.get; | ||
| } |
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.
How do we handle cases where the input is not post or get? (shouldn't happen if all endpoints follow the IPAs, but it's good to handle it gracefully in case it happens)
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.
For now, I can edit the PR to return in all other cases. When the support for the new extension is added, the logic for extracting the operationID will have to change to support all types of endpoints (ie: non-legacy, non-custom section of anticipated corrections)
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.
Done
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.
We can also consider to handle the list cases in the list rule, the get in the get rule etc. to keep the rules specific to the different methods
TY!
Proposed changes
Added a validation function, tests, and yamls for custom methods that use :action notation. Rules and tests are not enabled at this time (this will happen in CLOUDP-329722). This function will be extended to support an extension for legacy custom methods in following PR (CLOUDP-306294)
Jira ticket: CLOUDP-328960
For more details see the Technical Design