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

protoc-gen-swagger: allow -output dir #1679

Closed
anilcse opened this issue Sep 20, 2020 · 2 comments
Closed

protoc-gen-swagger: allow -output dir #1679

anilcse opened this issue Sep 20, 2020 · 2 comments

Comments

@anilcse
Copy link

anilcse commented Sep 20, 2020

Current protoc-gen-swagger doesn't have support for custom directory for generated files. It generates swagger files in the same directory structure as proto files. Moving them into a separate folder is an extra task for developers. Having a -output flag to specify the output dir can solve this and improve the experience

@johanbrandhorst
Copy link
Collaborator

Hi, thanks for your interest in the project! Isn't this already supported? Looking at the README example:

protoc -I . --swagger_out ./gen/swagger --swagger_opt logtostderr=true your/service/v1/your_service.proto

The value provided to --swagger_out is where the output of the file should go (in this case, ./gen/swagger). Does that work for you?

@anilcse
Copy link
Author

anilcse commented Sep 23, 2020

Thank you very much @johanbrandhorst for your help. I was using it wrongly.

@anilcse anilcse closed this as completed Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants