Grpc-gateway: Generating swagger version, contact name etc in generated docs

Created on 19 Jan 2017  路  3Comments  路  Source: grpc-ecosystem/grpc-gateway

Is there a way to pass high level swagger fields via proto (e.g. info details such as license:name, contact:name etc).

Also, I see that the generated swagger docs has : "version": "version not set". How can I pass version via proto?

Most helpful comment

FYI, In my use case, I wrote a swagger json with contact and versions then simply concat by jq in build pipeline.
eg: jq -s '.[0] * .[1]' service.swagger.json swagger-info.json >${out}

All 3 comments

@arun0009, seems like an interesting idea. To do this you will have to modify the upstream proto that this project implements. We have decided that we don't want to modify it locally to prevent an accidental fork from the spec.

If you decide to open a dialogue on googleapis/googleapis about this please add me on the issue. I would love to see how things play out.

I'm going to close this until the upstream proto is changed.

FYI, In my use case, I wrote a swagger json with contact and versions then simply concat by jq in build pipeline.
eg: jq -s '.[0] * .[1]' service.swagger.json swagger-info.json >${out}

FWIW I do the same as @t-yuki

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danforbes picture danforbes  路  4Comments

stevenroose picture stevenroose  路  3Comments

rexlv picture rexlv  路  3Comments

foolusion picture foolusion  路  4Comments

tamalsaha picture tamalsaha  路  3Comments