grpc-gateway
grpc-gateway copied to clipboard
proto-gen swagger: FQN package name and message name with some delimeter in between them
Problem: I've a proto file with package name "com.iotc.service.grpc.common" and a message with name PageInfo. When I run protoc-gen-swagger for this proto file and generate swagger doc, My swagger file has following model "commonPageInfo"
Is it possible to generate swagger doc with model name as FQN for package and then message name with "." in between them?
Example: I want this "com.iotc.service.grpc.common.PageInfo" but I'm getting "commonPageInfo".
@lps0535 thanks for the report. This is certainly something we should expose as a param on the generator. Would you be interested in taking a crack at this? The entrypoint is https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-swagger/main.go#L26
Is this addressed with openapi_naming_strategy=fqn
?
It sounds to me like we can close this, thanks Josh :)