-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
swagger title and version hardcoded #437
Comments
Two implementation ideas come to mind:
|
It might be more consistent with other configuration for particular plugins to add it as options in the proto file: https://developers.google.com/protocol-buffers/docs/proto3#options |
@erwinvaneyk, I think that would be a great way to approach this. Options defined in the proto would be great. @bamnet, would you like to take that on? |
I'm not as familiar with the landscape of plugins using custom options for configs, can you point me to a sample or two in the wild using custom options? I'm curious to see the other use cases for them. Sticking this in the proto is a much better idea than passing them as CLI flags 😄, but I'm not sure of a simple use case where service couldn't translate to title, and version couldn't be parsed from an http annotation following the style guide. Getting a basic version and service name automagically might be helpful for developers who don't want to do any work to the custom options. I can see options giving developers more control if they're not satisfied with the automatic extraction. |
FWIW, I did solve this and other customizations using a Makefile and jq to merge the files. I'm happy to share if anyone is interested. |
Related to #303 |
@c4milo I'd love your |
@patrickwmcgee, sure, this is what I do in my apis repo: https://gist.github.com/c4milo/01e344c369ed2f9e0253ca168047197d |
I believe you can do this now, thanks to Ivan. Thanks Ivan! |
Currently the swagger files generated by protoc-gen-swagger have
title
andversion
attributes which aren't very useful -e.g.
It would be great if these values better matched the spec, including a title for the service and some version information.
The text was updated successfully, but these errors were encountered: