Skip to content

[Core] Consolidate Operation ID generation#19339

Merged
wing328 merged 2 commits intoOpenAPITools:masterfrom
richardwhiuk:core-op-id-generation
Aug 14, 2024
Merged

[Core] Consolidate Operation ID generation#19339
wing328 merged 2 commits intoOpenAPITools:masterfrom
richardwhiuk:core-op-id-generation

Conversation

@richardwhiuk
Copy link
Copy Markdown
Contributor

@richardwhiuk richardwhiuk commented Aug 12, 2024

Minor core code refactor spotted while doing other development.

Currently we split Operation ID generation across two functions: getOrGenerateOperationId and fromOperation

This refactor moves all of the code into getOrGenerateOperationId

This has a knock-on effect, which means that callback operation IDs now get correctly created with a camel case name - I think this is an improvement.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    (For Windows users, please run the script in Git BASH)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.6.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Core Team for review: @wing328 , @jimschubert , @cbornet , @jmini , @etherealjoy

@wing328
Copy link
Copy Markdown
Member

wing328 commented Aug 12, 2024

https://github.com/OpenAPITools/openapi-generator/actions/runs/10350469557/job/28647111728?pr=19339

looks like the refactoring results in some changes in the samples, can you please take a look when you've time?

@wing328
Copy link
Copy Markdown
Member

wing328 commented Aug 13, 2024

cc @OpenAPITools/generator-core-team

@wing328
Copy link
Copy Markdown
Member

wing328 commented Aug 14, 2024

the refactoring looks good. thanks for the PR

@wing328 wing328 merged commit b800132 into OpenAPITools:master Aug 14, 2024
@wing328 wing328 added Feature: Generator Enhancement: Code Cleanup General refactoring, removal of deprecated things, commenting, etc. labels Aug 14, 2024
@wing328 wing328 added this to the 7.8.0 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement: Code Cleanup General refactoring, removal of deprecated things, commenting, etc. Feature: Generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants