-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Improve openapi-client sub-generator #10510
Comments
Any reason to not add it to swagger.gradle/pom.xml as a task instead of adding it to package.json? We already have a task that generates the server code in swagger.gradle/pom.xml, we can add another task that generates the client code as well. |
Indeed. Calling it from the JVM tools would be even better since OpenAPI-generator is a jar after all. For Maven we need to check if the plugin can be run outside of the build process. |
@ersinciftci I agree. The main problem so far is that each generated client has its own ClientConfiguration file. This file can be customized and should not be overwritten by the build process. I'll open another issue to discuss about it. Meanwhile the current PR improves the current generation process. It will alse be useful when we will implement code generation for frontend. |
Indeed. Maybe this file should be put in |
Overview of the feature request
The current implementation of openapi-client wraps the openapi-generator-cli npm package. It generates the client code by running the following command via shelljs:
The problem:
The developers cannot customize the generation command and the openapi templates. The openapi-generator-cli plugin is blackboxed by the sub-generator and there's no change to customize the generation process.
Improvements:
package.json
file. Openapi-client command will modify the package.json in this way:With this modification the client code can be regenerated by simply typing
This is also suggested in the openapi-generator-cli plugin documentation
Motivation for or Use Case
I think that at the moment the sub-generator wraps "too much" the openapi client. This is not how usually jhipster works. Developers will have the chance to modify the generation parameters based on what they need.
Let me know what you think. I already started working and will submit a PR soon.
Related issues or PR
#10491
The text was updated successfully, but these errors were encountered: