-
Notifications
You must be signed in to change notification settings - Fork 14
CLOUDP-328313: Quickfix for legacy custom methods #823
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ export function generateOperationID(method, path) { | |
// legacy custom method - use end of path as custom method name | ||
if (!method) { | ||
method = nouns.pop(); | ||
resourceIdentifier = resourceIdentifier.slice(0, resourceIdentifier.lastIndexOf('/')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a test case to cover this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, two fixes covered by the legacy custom method section of tests now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nit] Do we need test for empty operationIds/resourceIdentifier not in the shape we expected? |
||
} | ||
|
||
nouns = nouns.map((noun) => capitalize(noun)); | ||
|
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.
[nit] can be separate method for handling legacy operations right?
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 could probably make a method that contains the extra logic and calls on this function. Will be something to consider when I'm implementing the verbosity override - might refactor for use in generating a shorter recommended opId