-
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
protoc-gen-swagger does not generate parameters other than body and path parameters. #1012
Comments
Hi @winglq! It seems you stumbled upon our automatic patch-support by mistake! Yes, the update-mask is not there, because it's not necessary if you use JSON, where you can omit fields. See https://grpc-ecosystem.github.io/grpc-gateway/docs/patch.html |
If you would really like the update_mask to show up, you can turn off patch handling with the |
@johanbrandhorst thanks for the explaination. I tried to change the UpdateBookRequest as following:
But I could not get the title parameter. Here is the parameter section of the output.
According to google api design doc , title should be mapped to a query parameter. Not sure whether this behavior is also by design. Thanks. |
I would also expect the title to turn up as a query parameter, however, this could just be a big in the swagger generator. Could you see if the server parsing still works? Please raise a separate bug for this behaviour. |
A new issue #1012 is opened. |
BTW: I tried the master branch and the latest tagged release, and got the same result.
What did you expect to happen instead:
An update_mask should be there.
The text was updated successfully, but these errors were encountered: