Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Issue 5542, always generate pom and readme #7977

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

Merged
wing328 merged 3 commits into swagger-api:master from holzluxus:issue-5542
Apr 17, 2018
Merged

Issue 5542, always generate pom and readme #7977

wing328 merged 3 commits into swagger-api:master from holzluxus:issue-5542
Apr 17, 2018

Conversation

@inidona
Copy link
Contributor

@inidona inidona commented Apr 5, 2018
edited
Loading

#5542 not working for us

InterfaceOnly=true for not generating pom.xml not works in every situation.

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./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\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

(details of the change, additional tests that have been done, reference to the issue for tracking, etc)
Issue 5542, i added the additionalParameter "generateMeta=[true|false]" for controling generation of pom.xml and README.md. The generation of pom.xml depending on parameter interfaceOnly did not work for our situation. I generated with -DgenerateMeta=true and false

false
[main] INFO io.swagger.codegen.AbstractGenerator - writing file ...XXXResponse.java
[main] INFO io.swagger.codegen.AbstractGenerator - writing file ...XXXApi.java
[main] INFO io.swagger.codegen.AbstractGenerator - writing file ...swagger/.swagger-codegen/VERSION

and true
[main] INFO io.swagger.codegen.AbstractGenerator - writing file ...XXXResponse.java
[main] INFO io.swagger.codegen.AbstractGenerator - writing file ...XXXApi.java
[main] INFO io.swagger.codegen.AbstractGenerator - writing file ...swagger/pom.xml
[main] INFO io.swagger.codegen.AbstractGenerator - writing file ...swagger/README.md
[main] INFO io.swagger.codegen.AbstractGenerator - writing file ...swagger/.swagger-codegen/VERSION

@jeff9finger could you review this PR ?
@bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09)

Andreas Müller added 2 commits April 5, 2018 12:14
...rue for not generating pom.xml not works in every situation.
...rue for not generating pom.xml not works in every situation.
@inidona inidona changed the title (削除) Issue 5542, generate pom.xml with separate parameter. InterfaceOnly=t... (削除ここまで) (追記) Issue 5542, spring generate pom.xml with separate parameter. (追記ここまで) Apr 5, 2018
Copy link
Contributor

wing328 commented Apr 6, 2018

What about using .swagger-codegen-ignore to skip files that you don't need?

Copy link
Contributor Author

inidona commented Apr 6, 2018

I need this files. In actual master branch this files were not generated with additionalParameter interfaceOnly=true, because of this i added the new parameter generateMeta and when this is true the pom.xml and README.md will be generated. It is now possible to control with a parameter to generate pom.xml, README.md or not, and not implicit with interfaceOnly=true|false

Copy link
Contributor

wing328 commented Apr 8, 2018

Instead of introducing another option, what about including those files when interfaceOnly=true? (users can use .swagger-codegen-ignore to skip those during code generation)

We want to avoid too many options to customize the output.

Copy link
Contributor Author

inidona commented Apr 8, 2018

this is ok for me, so i have to revert the part of PR https://github.com/swagger-api/swagger-codegen/pull/5545/files at the location where the files were generated ?
So .swagger-codegen-ignore was the better option for the original poster ?

Copy link
Contributor Author

inidona commented Apr 10, 2018

@wing328 can you tell me what i should do now ?

Copy link
Contributor

wing328 commented Apr 10, 2018

@inidona If I understand correctly, you will need to change the behavior of the InterfaceOnly=true option to also generate the pom file.

Copy link
Contributor Author

inidona commented Apr 10, 2018

@wing328 yes, i would generate the pom.xml always.

Copy link
Contributor

wing328 commented Apr 12, 2018

@inidona sorry that I wasn't clear. My suggest is to avoid adding another option "GENERATE_META" and rather update the existing "INTERFACE_ONLY" option to generate the pom.xml as well.

Please reach me via the email address in my Github profile if you can to dicuss this further (email is much easier to draw my attention than a discussion in the issue tracker)

Copy link
Contributor Author

inidona commented Apr 13, 2018

@wing328 i made my changes

@inidona inidona changed the title (削除) Issue 5542, spring generate pom.xml with separate parameter. (削除ここまで) (追記) Issue 5542, always generate pom and readme (追記ここまで) Apr 13, 2018
Copy link
Contributor Author

inidona commented Apr 16, 2018

@jeff9finger could you review this PR ?
@bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09)

Copy link

@jeff9finger jeff9finger left a comment

Choose a reason for hiding this comment

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

This change seems to always include pom.xml and README.md. There is no condition for interfaceOnly == true.

If I understand the conversation correctly, these files are only supposed to be included when interfaceOnly == true

Copy link
Contributor Author

inidona commented Apr 16, 2018

Hi, no i talked with wing328 and we have consent that the files should always been generated. If a user don't won't these files he have to use .swagger-codegen-ignore

thanks
andreas

Copy link

@jeff9finger jeff9finger left a comment

Choose a reason for hiding this comment

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

OK. Thanks for the clarification.

LGTM 👍

@wing328 wing328 merged commit 77fd35f into swagger-api:master Apr 17, 2018
@wing328 wing328 added this to the v2.4.0 milestone Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@jeff9finger jeff9finger jeff9finger approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

v2.4.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /