-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
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
Issue with google.protobuf.Empty representation in swagger file #831
Comments
It is indeed expected behaviour, the JSON definition of google.protobuf.Empty is an empty object. If you want to have some text there you may have to define your own type. |
@johanbrandhorst I understand it, but comment before type rendered to Definition as description and title, on https://editor.swagger.io/ title always rendered as definition name and.
First part(Before first blank line) of comment will be stored in field title
Second part(After first blank line) will be stored in field description
Swagger UI replace definition name and render title field instead of it, and it looks ugly My question was is this some contract all before blank line we render to title and remain as description on my opinion i think whole comment must rendered as description. |
The
|
The gRPC-Gateway project is maintained by volunteers in their spare time. Please follow these troubleshooting steps before submitting an issue.
grpc-gateway
library to the latest version from github:protoc-gen-grpc-gateway
andprotoc-gen-swagger
binary from yourPATH
,and reinstall the latest versions:
I still have a problem!
Steps you follow to reproduce the error:
Add
google.protobuf.Empty
as your response messageand generate swagger file
What did you expect to happen instead:
I want see whole comment as description field in protobufEmpty definition but instead text before first blank line add to title and remaining text to description it prevent two bad view in https://editor.swagger.io/ because title rendered as definition name.
Is that expected behavior ? Or how i can fix it ?
The text was updated successfully, but these errors were encountered: