Closed lelandbatey closed 5 years ago
--- FAIL: TestMessages (0.06s)
newfromstring_test.go:119: got != want; methods differ: --- A
Will be addressed in https://github.com/metaverse/truss/pull/274, but aren't related the this changes in this PR. Merging.
This PR fixes a bug which can arise when the name of a parameter is lowercase in a service definition. The bug arises when the field name of a message is lowercase in the
.proto
definition and it's specified to be in a custom location in the HTTP options of a service definition. Example:When
truss
is run against this file, it issues the following warning:This warning shouldn't exist, as the parameter is specified to be in the
body
of the request. The bug arose because the name of the type was CamelCased in the generated Go code but not in the protobuf definition, so when they where compared, they'd be missed and would default to being put in the query. To fix this, the names from the protobuf definition are CamelCased before they're compared.