grpcgateway
grpcgateway copied to clipboard
GRPCGATEWAY-20 match against named URL template slots correctly
- update GrpcGatewayHandler to use a single supportsCall method to both match a URI and extract parameters from it in one pass
- update GatewayGenerator to support the new code template
- add URL template parsing logic to the runtime package
- add a GatewayGenerator unit tests that uses a hard-coded CodeGeneratorRequest to quickly generate a representative demo handler
in a generated Handler
- create a map for every HTTP verb used in the protobuf
- each map entry represents a URL template matcher to request processor method mapping
- for every request, try all applicable matchers
- if a match is found, return the corresponding processor method
- make GrpcGatewayHandler execute the method
@ndolgov @btlines @xuwei-k any further interest in getting this PR to master ? I resolved the merge conflicts and other import issues here https://github.com/saurcery/grpcgateway/commit/c3998fcad58d95937c6e0fc2622bf2d48453fa69#diff-42123b068abeef330b1c78c05cbee1d5
Its quite useful feature for RESTful API support imo. Let me know how I can help!
I have a feeling @btlines has abandoned this repo. It's a pity because the idea was intriguing.