We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when using the comment req's param, but the generated swagger file has not description field?
req's param
here is proto file:
syntax = "proto3"; package demoprj; import "google/api/annotations.proto"; import "protoc-gen-swagger/options/annotations.proto"; option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { host: "127.0.0.1:8301" }; message Req { string param = 1; //req's param } message Rsp {} // Demoprj service Demoprj { // method's comment rpc Method (Req) returns (Rsp) { option (google.api.http) = { get: "/v1/method" }; } }
here is the generate swagger json file:
"/v1/method": { "get": { "operationId": "Demoprj_Method", "parameters": [ { "in": "query", "name": "param", "required": false, "type": "string" } ], "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/demoprjRsp" } }, "default": { "description": "An unexpected error response", "schema": { "$ref": "#/definitions/runtimeError" } } }, "summary": "method's comment", "tags": [ "Demoprj" ] } },
The text was updated successfully, but these errors were encountered:
As you can see in our proto example, you can add a description to the line above the field and it will be added to the description:
https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/a_bit_of_everything.proto#L205-L206 https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/a_bit_of_everything.swagger.json#L190-L191
Sorry, something went wrong.
No branches or pull requests
when using the comment
req's param
, but the generated swagger file has not description field?here is proto file:
here is the generate swagger json file:
The text was updated successfully, but these errors were encountered: