grpcgateway icon indicating copy to clipboard operation
grpcgateway copied to clipboard

GRPCGATEWAY-20 match against named URL template slots correctly

Open ndolgov opened this issue 7 years ago • 2 comments

  • 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 avatar Jan 19 '18 05:01 ndolgov

@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!

saurcery avatar Oct 09 '18 22:10 saurcery

I have a feeling @btlines has abandoned this repo. It's a pity because the idea was intriguing.

ndolgov avatar Oct 10 '18 04:10 ndolgov