openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[REQ] No option available to turn off postProcess message from OpenAPI Generator tool. When used in automated mode, it would be better to provide an option not to spit this text out.

Open vamshikrishna83 opened this issue 3 years ago • 9 comments

In our gradle build system, we use OpenAPI Generator tool, and we always end up getting this below message as part of the build logs. It would be ideal to provide an option for the user to turn off writing these messages to console / log files in automated environments like maven / gradle builds. This text is fine to be displayed when run from a command line tool.

################################################################################
# Thanks for using OpenAPI Generator.                                          #
# Please consider donation to help us maintain this project ?                 #
# https://opencollective.com/openapi_generator/donate                          #
################################################################################

Usually other automated tools / utilities provide an option similar to silent / quiet to stop producing this text on console / logs.

vamshikrishna83 avatar Jan 02 '22 12:01 vamshikrishna83

This is how my build log looks like when I've set the log level to WARN: image

🤯

bjorgvino avatar Mar 24 '23 10:03 bjorgvino

I would love to be able to do this as well.... a parameter?

epugh avatar Jan 09 '24 11:01 epugh

I would prefer to disable that message too.

We are running the generator for multiple files and because of that our CI build log is flooded with these useless entries!

At least it should be done in a way that its only shown once per build!

david0 avatar Feb 07 '24 09:02 david0

Exactly same case for me :)

damianknapik97 avatar Feb 08 '24 20:02 damianknapik97

same :sleeping:

nocive avatar Apr 04 '24 08:04 nocive

Same for us. It's really annoying in our build logs.

KangoV avatar Apr 24 '24 09:04 KangoV

This is worse than Ansible's cowsay default behavior, in that this isn't cute, it's an advertisement, there is no way to disable it, and there has been no response from repo owners after 2+ years.

mjperrone avatar Apr 24 '24 19:04 mjperrone

So.. Maybe one of us should open up a PR to add this feature?

epugh avatar Apr 29 '24 11:04 epugh

welcome PR

maybe adding a --quiet mode similar to what mvn offers: https://stackoverflow.com/a/71086/677735?

a workaround it to skip line starting with # using grep -v, e.g.

./bin/generate-samples.sh ./bin/configs/java-okhttp-gson-3.1.yaml  | grep -v "^#"

wing328 avatar Apr 29 '24 11:04 wing328