You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// test
rpc GetTest(GetTestRequest) returns (GetTestReply) {
option (openapi.v3.operation) = {
summary : "test",
parameters: [
{
parameter: { // Too much configuration content
name: 'data',
in: "query",
description: "data",
schema: {
schema: {
type: "string",
example: {
yaml: "ttt"
}
}
}
}
}
]
};
option (google.api.http) = {
get : "/test"
};
}
message GetTestRequest {
// title
string title = 1[
(openapi.v3.property) = {example: {yaml: "213"}} // It looks good, but it's not work
];
}
message GetTestReply {
int32 code = 1;
string res = 2;
}
// openapi.yaml
/test:
get:
tags:
- Course
summary: GetTest
description: GetTest
operationId: Course_GetTest
parameters:
- name: title
in: query
description: title
schema:
type: string // used FieldOptions success
- name: data
in: query
description: data
schema:
example: ttt // used MethodOptions success
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetTestReply'
I want to add an example to my openapi.yaml request parameter. The entry of the body format in the post method was successful, but it failed in the query. Although I found a MethodOptions custom way, I thought it was too complicated. How can I do it at the FieldOptions?
The text was updated successfully, but these errors were encountered:
body (success)
query(fail)
I want to add an example to my openapi.yaml request parameter. The entry of the body format in the post method was successful, but it failed in the query. Although I found a MethodOptions custom way, I thought it was too complicated. How can I do it at the FieldOptions?
The text was updated successfully, but these errors were encountered: