-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Allow specifying/overriding the parent in the pom file for Java and Spring #1132
Conversation
…pring generators.
I'm not sure about the value of adding 3 more fields just to add 3 lines in a pom... |
I'm not sure how other people use the generator, but I'm using it to generate a module that the rest of my project then depends on. I'm running the generator to create the module from scratch as part of every build (so that the latest changes to the OpenAPI spec files are applied every time). After the module is generated, we don't want to have to make any changes to that module, we just want to have implemented the interfaces that are defined in the generated module in a separate module. Currently it sort of works having the parent define the child project as a module, but the parent not specified in the child pom. But to avoid breaking some of my builds I have to specify the modules in a specific order so that the generated module is not processed first. |
Any updates on whether this pull request will be accepted? Or if there's anything else you'd like me to do? |
Have you tried using your own template for this instead ? You can do it by just providing a template dir with the |
I've done exactly that but figured I wouldn't be the only person who would want this functionality and as it's unintrusive change I thought I might as well submit a pull request. As a plus side it also means I wouldn't have to merge any changes to the template whenever I start using a new version of the generator. |
@mwoodland as discussed, please consider using |
I've restarted the Travis build and will merge this PR into master once the build passes. |
@mwoodland thanks again for the enhancement, which has been included in the v3.3.1 release: https://twitter.com/oas_generator/status/1052020299821080577 |
OpenAPITools#1132) * Allow specifying/overriding the parent in the pom file for Java and Spring generators. * Don't add extra whitespace to the pom file when the parent isn't overridden. * Remove accidentally added white space.
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.3.x
,4.0.x
. Default:master
.Description of the PR
Add support for overriding/specifying the parent in the generated pom file.
issue #1131
The run-all-petstore.cmd command did't work as some of the scripts it calls are looking for jars in swagger-codegen-cli directory - hence why I haven't checked "ran the schell script" above.
I have checked using the Spring generator while specifying none of the parent properties, all of them and one of them.
@bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01)