Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export function generateOperationID(method, path) {
// legacy custom method - use end of path as custom method name
Copy link
Member

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?

Copy link
Contributor Author

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

if (!method) {
method = nouns.pop();
resourceIdentifier = resourceIdentifier.slice(0, resourceIdentifier.lastIndexOf('/'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test case to cover this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Copy link
Member

@wtrocki wtrocki Jul 16, 2025

Choose a reason for hiding this comment

The 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));
Expand Down
Loading