metaverse/truss

Generate Swagger Definitions for API Exploration

zaquestion opened this issue · 4 comments

Generate Swagger Definitions for API Exploration

@matthewhartstonge, any update on this issue?

@SantoshSah check out https://github.com/grpc-ecosystem/grpc-gateway.

They have a gRPC plugin protoc-swagger-gen which should work with any proto file that makes use of the google.api.http annotations (which truss uses). Haven't used it personally, but is the tool I will be looking at to generate a base for our swagger definitions.

Check out step 7 under the usage heading.

Nice, I hadn't seen that! If we can get some testing with it, we could possibly callout to it from truss.

Truss forms its protoc arguments here: https://github.com/metaverse/truss/blob/master/truss/execprotoc/execprotoc.go#L20-L26

Sometimes it can be easier to edit them directly there and call all the extensions at once vs running protoc again for different extensions