Skip to content
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

Added feature to set schema mappings when generation clients. #846

Conversation

denvitaharen
Copy link
Contributor

@denvitaharen denvitaharen commented Nov 7, 2024

When we tried to migrate from specifying our own openapi generator in Maven to Quarkus OpenAPI generator we realized that we missed the possibility two specify schema mappings: https://openapi-generator.tech/docs/customization/#schema-mapping

Its possible to specify that in the OpenAPI generator, so it was just to expose it so you can set it in the application.properties.

Updated the type mapping test and updated the documentation, hopefully I did all I supposed to do, this is my first attempt to help in an public repo :)

  • 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

@denvitaharen denvitaharen requested a review from a team as a code owner November 7, 2024 22:22
@denvitaharen
Copy link
Contributor Author

Strange that the build failed, it (as usual) worked when I tried it with mvn clean install, I'm looking in to why it doesn't work.

@hbelmiro
Copy link
Contributor

hbelmiro commented Nov 8, 2024

@denvitaharen take a look at https://github.com/quarkiverse/quarkus-openapi-generator/blob/main/CONTRIBUTING.md#resteasy-reactive-and-resteasy-classic for testing RESTEasy Reactive locally.

@denvitaharen
Copy link
Contributor Author

Sorry, my bad! I didn't noticed the different profiles, probably to tired to understand :)

I have updated the test, rerun the test suite and it works now.

@denvitaharen
Copy link
Contributor Author

I updated the definition of YearMonth in the OpenAPI yaml. It was incorrect, it represented an LocalDateTime instead of an YearMonth. It doesn't change anything in the functionality, it's more about having a correct OpenAPI specification.

Thanks to my colleague @sajox that saw the error.

@denvitaharen
Copy link
Contributor Author

Hi!

Do you have any feedback on my pull request?

@hbelmiro
Copy link
Contributor

Sorry @denvitaharen.
I didn't have the time to review it yet, but it's on my plate.

@ricardozanini ricardozanini merged commit fe4c1f5 into quarkiverse:main Nov 29, 2024
7 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 29, 2024
* Added feature to set schema mappings when generation clients.

* Updated Restreactive test with schemamapping

* Updated the YearMonth schema to be correct format.

* Updated the documentation

---------

Co-authored-by: Ricardo Zanini <[email protected]>
hbelmiro pushed a commit that referenced this pull request Nov 29, 2024
…879)

* Added feature to set schema mappings when generation clients.

* Updated Restreactive test with schemamapping

* Updated the YearMonth schema to be correct format.

* Updated the documentation

---------

Co-authored-by: Richard Alm <[email protected]>
Co-authored-by: Ricardo Zanini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants