Conversation

askvortcov

Adds a CLI parameter --useOperationId, which allows using or ignoring OperationId in the swagger and relies on the path to generate operation names.

Use path placeholders to decorate operation names.

Ignoring operation ID is handy when working with a swagger generated by springdoc-openapi, since it generates messy operation IDs when confronted with multiple possibilities of Accept header.

resolves #1525

@askvortcovaskvortcov mentioned this pull request Feb 19, 2024
bin/index.js Outdated
@@ -19,6 +19,7 @@ const params = program
.option('--exportCore <value>', 'Write core files to disk', true)
.option('--exportServices <value>', 'Write services to disk', true)
.option('--exportModels <value>', 'Write models to disk', true)
.option('--ignoreOperationId <value>', 'Use operation id', true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.option('--ignoreOperationId <value>', 'Use operation id', true)
.option('--ignoreOperationId <value>', 'Ignore operation id', true)

Although I agree with the initial intent – make the flag opt-in and default to true to preserve current functionality

Suggested change
.option('--ignoreOperationId <value>', 'Use operation id', true)
.option('--useOperationId <value>', 'Use operation id', true)

Copy link
Author

Choose a reason for hiding this comment

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

Fixed in the next commit. Thanks for the review.

@mrlubos

@askvortcov want to open this pull request against our fork?

@askvortcovaskvortcov force-pushed the allowIgnoringOperationId branch from e8e7a31 to af4dfb7 Compare February 20, 2024 10:14
@askvortcov

@askvortcov want to open this pull request against our fork?

@mrlubos, Done. There is a merge conflict though. If I merge it it pulls too many commits along.

@mrlubos

@askvortcov no worries, I will resolve it!

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

OperationId - disable