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

Add support for Micronaut Client #10063

Merged
merged 14 commits into from Aug 15, 2021
Merged

Add support for Micronaut Client #10063

merged 14 commits into from Aug 15, 2021

Conversation

andriy-dmytruk
Copy link
Contributor

This PR adds support to generate Micronaut Declerative Java client by creating a new generator for that.

For more information about micronaut refer to:

I tested generation on multiple configuration files, and run all the requirements as specified when creating PR.

Java Technical committee: @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @nmuesch (2021/01)
Micronaut creator: @graemerocher

@wing328
Copy link
Member

wing328 commented Jul 30, 2021

@andriy-dmytruk thanks for the PR. What about adding micronaut as a library option in the existing java generator, which already supports Jersey 2.x, retrofit 2.x, resttemplate, resteasy, okhttp-gson and more?

@andriy-dmytruk
Copy link
Contributor Author

@wing328 Thanks for the feedback.
Yes, it is possible to do this if it is considered a better solution than what is given here. In fact, it won't be very hard.
However, there are quite some differences. Multiple files that are added for the libraries do not really seem to be appropriate for a framework to me, so I will need to remove them there.
Also, I am planning to work on Micronaut server implementation after this. So I wonder if it is somehow possible to reuse some of the mustache files and not copy everything?

@wing328
Copy link
Member

wing328 commented Aug 3, 2021

@wing328
Copy link
Member

wing328 commented Aug 15, 2021

Tested locally and the result is good

[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing /Users/williamcheng/Code/openapi-generator/samples/client/petstore/java-micronaut-client/target/petstore-micronaut-1.0.0.jar with /Users/williamcheng/Code/openapi-generator/samples/client/petstore/java-micronaut-client/target/petstore-micronaut-1.0.0-shaded.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 49.536 s
[INFO] Finished at: 2021-08-15T22:32:26+08:00
[INFO] ------------------------------------------------------------------------

@wing328 wing328 merged commit 09aa7bf into OpenAPITools:master Aug 15, 2021
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.

None yet

2 participants