grpc-ecosystem/grpc-gateway
View on GitHubPlease add option to use FQN as swagger name
Open
#471 opened on Oct 7, 2017
enhancementhelp wantedopenapi
Description
The default logic to map FQN to swagger name is good(https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-swagger/genswagger/template.go#L332).
We have many proto files. and they have some import with each other. Use the logic to shortten FQN is not so good in some case.
e.g.
retail.proto has message CreateOrderRequest {}
warehouse.proto also has message CreateOrderRequest {}
If warehouse.proto was imported by retail, warehouse.CreateOrderRequest will use warehouseCreateOrderRequest as swagger name in retail.swagger.json. But the swagger file generated by warehouse.proto was CreateOrderRequest. It's hard for us to merge the two swagger file into one.
I prefer keep the FQN as swagger name, any ideas ?