-
Notifications
You must be signed in to change notification settings - Fork 144
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
gRPC HTTP body mapping works incorrectly #325
Comments
UPD: Nevermind, this is working fine. |
interesting, ive never looked that closely at how the mapping is supposed to function, it seems like there is a mismatch in what truss does and the spec. The wildcard case i would expect to need to be wrapped too? youre saying this allowed you to remove the outer @adamryman can you shed any insight on this and advise on fixing? |
No, the wildcard should take the whole request body as is, except fields that are mapped in the request path, so in this case "shelf" object should not be removed. |
Hi, I've noticed some inconsistency with grpc http transcoding.
Here's how to reproduce it:
Full schema:
curl -d '{"theme":"Music"}' 'http://localhost:5050/v1/shelves'
The server does not set the Shelf field:
If you wrap the body with the shelf object, like
curl -d '{"shelf": {"theme":"Music"}}' 'http://localhost:5050/v1/shelves'
the field will be correctly set to
theme:"Music"
The text was updated successfully, but these errors were encountered: