Closed
Description
protoc-gen-swagger from current grpc-gateway master
rpc Update(AccountUpdateReq) returns (Account) {
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { operation_id: "AccountUpdate";
responses: {
key: "default";
value: {
description: "Error response";
schema: {
json_schema: {
ref: ".Error";
}
}
}
}
};
option (google.api.http) = { put: "/api/v0/accounts/{account.uuid}" body: "account"; };
};
message AccountUpdateReq {
Account account = 1;
google.protobuf.FieldMask fields = 2;
};
generates:
"/api/v0/accounts/{account.uuid}": {
"put": {
"operationId": "AccountUpdate",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/Account"
}
},
"default": {
"description": "Error response",
"schema": {
"$ref": "#/definitions/Error"
}
}
},
"parameters": [
{
"name": "account.uuid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Account"
}
}
],
"tags": [
"AccountService"
]
}
},
Metadata
Metadata
Assignees
Labels
No labels