You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ?
The text was updated successfully, but these errors were encountered:
@idy, I think this would be a great flag addition to the swagger generator.
If you want to try this out, you should look at #280 for an example of how to add a flag guarded feature. Then you would just have to get that flag value in the mapping function, add an if to maintain the old logic in the flag=false case and put your new code plus some tests in.
If you need any help with that please comment on this but and I'll point you in the right direction
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
hasmessage CreateOrderRequest {}
warehouse.proto
also hasmessage 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 ?
The text was updated successfully, but these errors were encountered: