utrack / clay

Proto-first minimal server platform for gRPС+REST+Swagger APIs
MIT License
289 stars 39 forks source link

HTTP client: path builder uses wrong names for nested bindings in path #79

Closed utrack closed 4 years ago

utrack commented 4 years ago
service Strings {
  rpc ToUpper(String) returns (Empty) {
    option (google.api.http) = {
      put : "/strings/{sub.id}"
      body : "sub"
      additional_bindings {patch : "/strings/{sub.id}" body : "sub"}
    };
  }
}

HTTP query builder uses proto member names instead of Go names:

u := url.URL{
    Path:     fmt.Sprintf("/strings/%v", in.sub.Id),
    RawQuery: values.Encode(),
}