Skip to content

Conversation

@yuhaibohotmail
Copy link
Contributor

@yuhaibohotmail yuhaibohotmail commented Nov 21, 2024

  • You have read the contributors guide
  • Your code is properly formatted according to our code style
  • Pull Request title contains the target branch if not targeting main: [0.9.x] Subject
  • Pull Request contains link to the issue
  • Pull Request contains link to any dependent or related Pull Request
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket

Fix #866

When use smallrye openapi operationid strategy CLASS_METHOD,operationId fields take the form of "class_name_method". For example, "User_findAll". We want remove operationId prefix (e.g. User_findAll=> findAll)

In this PR, we add a config properties remove-operation-id-prefix,to delete class name from operationId. The properties are passed to the openapi-generator, and the specific functions are executed by the openapi-generator.

https://github.com/OpenAPITools/openapi-generator/blob/4c5a57fe7bae59483bb8fa9218be8dc4f82e1bda/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java#L5638

@yuhaibohotmail yuhaibohotmail requested a review from a team as a code owner November 21, 2024 23:36
Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

I need help finding what this PR is doing. I'm only seeing an introduction of a property to the generator. What do you do with it after? Or is this something that the underlying generator already takes care of? If so, please add a reference.
Can you also please add some tests under the integration-tests module?

dependabot bot and others added 2 commits November 22, 2024 11:51
…erse#858)

Bumps [org.openapitools:openapi-generator](https://github.com/openapitools/openapi-generator) from 7.8.0 to 7.10.0.
- [Release notes](https://github.com/openapitools/openapi-generator/releases)
- [Changelog](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/3.0.0-release-note.md)
- [Commits](OpenAPITools/openapi-generator@v7.8.0...v7.10.0)

---
updated-dependencies:
- dependency-name: org.openapitools:openapi-generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <[email protected]>
@yuhaibohotmail
Copy link
Contributor Author

I need help finding what this PR is doing. I'm only seeing an introduction of a property to the generator. What do you do with it after? Or is this something that the underlying generator already takes care of? If so, please add a reference. Can you also please add some tests under the integration-tests module?

Thanks for the review.
I only add the property , the functions are executed by the openapi-generator.
This is a function of openapi-generator. Do I need to write an integration test?

…kiverse#864)

* Fix quarkiverse#852 - Process Qute templates in a strict manner

Signed-off-by: Ricardo Zanini <[email protected]>

* Fix discriminator annotations on pojo.qute

Signed-off-by: Ricardo Zanini <[email protected]>

* Improve testing on discriminator annotations

Signed-off-by: Ricardo Zanini <[email protected]>

* Incorporate @hbelmiro review

Signed-off-by: Ricardo Zanini <[email protected]>

---------

Signed-off-by: Ricardo Zanini <[email protected]>
@ricardozanini
Copy link
Member

@yuhaibohotmail, thanks for clarifying it. You can use the deployment module tests to test it or add a new integration-test module.

@yuhaibohotmail
Copy link
Contributor Author

yuhaibohotmail commented Nov 27, 2024

@yuhaibohotmail, thanks for clarifying it. You can use the deployment module tests to test it or add a new integration-test module.

@ricardozanini , we have the new integration-test module.

@yuhaibohotmail yuhaibohotmail deleted the remove-operation-id-prefix branch November 27, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requires remove operationid prefix

3 participants