moul / protoc-gen-gotemplate

:open_file_folder: generic protocol generator based on golang's text/template (grpc/protobuf)
https://manfred.life/protoc-gen-gotemplate
MIT License
430 stars 70 forks source link

use json_name when checking vars in urlHasVarsFromMessage #169

Closed mgenov closed 3 years ago

mgenov commented 3 years ago

Is your feature request related to a problem? Please describe. The URL check requires variable names to be the same as name of the variables in proto files and not the JSON specific ones.

For example given that field type: <name:"tenant_id" number:1 label:LABEL_OPTIONAL type:TYPE_STRING json_name:"tenantId" >

The urlHasVarsFromMessage uses tenant_id instead of tenantId which sounds like more reasonable as REST api.

Describe the solution you'd like The function could check both names to ensure that URL parameters are available.

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 1.11.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: