grpcgateway
grpcgateway copied to clipboard
Named URL path templates are not parsed correctly
In v0.0.8 named slots are not extracted from "/v1/messages/{message_id}-like URL templates. Instead in the generated handler:
- an incoming URI (e.g. "/v1/messages/123") is literally compared with "/v1/messages/{message_id}"
- even if that somehow worked, the actual value (i.e. "123") is not extracted from the URI and so cannot be used when an instance of request case class is created
More examples can be found at "https://cloud.google.com/service-management/reference/rpc/google.api#httprule". The spec seems to allow quite complicated combinations of ordinary params, named params, and HTTP request body. A useful first step would be to
- match against named slots correctly
- support simple cases such as "/v1/messages/123") => SomeRequest(message_id = 123)
https://github.com/btlines/grpcgateway/pull/21