gogo/grpc-example

How is the OpenAPI UI generated?

yurishkuro opened this issue · 1 comments

I see a number of static assets added in a6e1cf3, but no indication where they came from. The option --swagger_out=third_party/OpenAPI/ to protoc only generates the JSON file. If I want to serve swagger UI from my application, how would I go about generating them? I don't want to just copy them from this repo.

I'm happy to create a PR with example/explanation if you point me in the right direction.

Hi!

The request/reply elements are all dynamically generated from the generated swagger.json file by swagger-ui.js. The contents of the third_party/OpenAPI folder are copied directly from the dist folder of the OpenAPI-UI project.

You're welcome to create a PR to clarify this in the README if you think it's unclear and should be added.