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
// SumRequest is a request for Summator service.
message SumRequest {
// A is the number we're adding to. Can't be zero for the sake of example.
int64 a = 1;
// B is the number we're adding.
int64 b = 2;
}
This proto message is generated to corresponding doc:
...
"properties": {
"a": {
"type": "string",
"format": "int64",
"description": "a is the number we're adding to. can't be zero for the sake of example."
...
But if we'll remove the trailing dot in A's comment then description becomes title:
"properties": {
"a": {
"type": "string",
"format": "int64",
"title": "A is the number we're adding to. Can't be zero for the sake of example"
and this title is invisible in the model's outline (see the screenshot).
It is intended judging by the code, but this behaviour clearly breaks Swagger UI.
The text was updated successfully, but these errors were encountered:
Huh, this is strange. Especially strange given that it looks like we have code to handle it. I don't have an answer on what's going on here, but want to document what I have looked at
Doesn't look like we are setting the title at all.
Could it be that we are copying the struct from proto into the swagger types somewhere? I didn't think we did that and also It seems like the interfaces would be incompatible and disallow that but that's the best theory I have off the top of my head.
@achew22 We've got the (weird) code that decides if comment is description or title here.
It sets Title and Description through reflection (prolly I could refactor it?)
This proto message is generated to corresponding doc:
But if we'll remove the trailing dot in A's comment then description becomes title:
and this title is invisible in the model's outline (see the screenshot).
It is intended judging by the code, but this behaviour clearly breaks Swagger UI.
The text was updated successfully, but these errors were encountered: