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
Generate stubs like so (for protos/yaml defined further below):
common="-I/usr/local/include -I${GOPATH}/pkg/mod/ -Isample -I${GOPATH}/src" spec=sample/services.yaml gwopt="logtostderr=true,allow_delete_body=true,grpc_api_configuration=${spec}" swopt="${gwopt},json_names_for_fields=true,allow_merge=true" protoc $common --plugin=$GOPATH/bin/protoc-gen-go \ --go_out=plugins=grpc:$GOPATH/src sample/*.proto protoc $common --plugin=$GOPATH/bin/protoc-gen-grpc-gateway \ --grpc-gateway_out=${gwopt}:$GOPATH/src sample/*.proto protoc $common --plugin=$GOPATH/bin/protoc-gen-swagger \ --swagger_out=${swopt}:sample/ sample/*.proto
sample/a.proto
syntax = "proto3"; package sample; import "google/protobuf/empty.proto"; // Message A message MsgA { // Success or error code int32 code = 1; // Descriptive success or error message string message = 2; } // Service for Message A service MsgAService { // RPC for getting Message A rpc GetMsgA (google.protobuf.Empty) returns (MsgA) {} }
sample/b.proto
syntax = "proto3"; package sample; import "google/protobuf/empty.proto"; // Message B message MsgB { // Success or error code int32 code = 1; // Descriptive success or error message string message = 2; } // Service for Message B service MsgBService { // RPC for getting Message B rpc GetMsgB (google.protobuf.Empty) returns (MsgB) {} }
sample/services.yaml
type: google.api.Service config_version: 3 http: rules: - selector: sample.MsgAService.GetMsgA get: /api/msga - selector: sample.MsgBService.GetMsgB get: /api/msgb
summary key is missing for /api/msgb in following portion of the generated spec.
summary
"paths": { "/api/msga": { "get": { "summary": "RPC for getting Message A", "operationId": "MsgAService_GetMsgA", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/sampleMsgA" } }, "default": { "description": "An unexpected error response", "schema": { "$ref": "#/definitions/runtimeError" } } }, "tags": [ "MsgAService" ] } }, "/api/msgb": { "get": { "operationId": "MsgBService_GetMsgB", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/sampleMsgB" } }, "default": { "description": "An unexpected error response", "schema": { "$ref": "#/definitions/runtimeError" } } }, "tags": [ "MsgBService" ] } } }
The text was updated successfully, but these errors were encountered:
Hi, thanks for the bug report, I'd rather we just reopen the other issue. Could you cross post your report there?
Sorry, something went wrong.
No branches or pull requests
Steps:
Generate stubs like so (for protos/yaml defined further below):
sample/a.proto
sample/b.proto
sample/services.yaml
Issue:
summary
key is missing for /api/msgb in following portion of the generated spec.The text was updated successfully, but these errors were encountered: