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
protoc-gen-swagger map type filed doesn't support options.openapiv2_field #1601
Comments
Hi, thanks for the bug report. Really nice work debugging this, would you be willing to submit a fix? I'd start by adding a failing test, and then try and modify the code. |
@johanbrandhorst The master branch can reproduce this bug, I will submit a PR in the next few days. |
yangxikun
pushed a commit
to yangxikun/grpc-gateway
that referenced
this issue
Aug 17, 2020
yangxikun
pushed a commit
to yangxikun/grpc-gateway
that referenced
this issue
Aug 17, 2020
yangxikun
added a commit
to yangxikun/grpc-gateway
that referenced
this issue
Aug 17, 2020
johanbrandhorst
pushed a commit
that referenced
this issue
Aug 19, 2020
yangxikun
added a commit
to yangxikun/grpc-gateway
that referenced
this issue
Aug 19, 2020
johanbrandhorst
pushed a commit
that referenced
this issue
Aug 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Bug Report
generated swagger json:
permissions.title and permissions.description is not set.
Your Environment
grpc-gateway v1.14.6
Other Info
I dig into the source code of protoc-gen-swagger, found the problem is in
template.go:schemaOfField
:When the field is map type,
fd = m.GetField()[1]
use the value's FieldDescriptorProto. Because the mapentry is auto generate, so the fd.Options is always nil.The text was updated successfully, but these errors were encountered: