grpc-ecosystem/grpc-gateway

Hosting the grpc-gateway with an OpenAPI ui?

Open

#2 782 ouverte le 3 juil. 2022

Voir sur GitHub
 (1 commentaire) (3 réactions) (0 assignés)Go (2 250 forks)batch import
documentationhelp wanted

Métriques du dépôt

Stars
 (16 971 stars)
Métriques de merge PR
 (Merge moyen 1j 4h) (141 PRs mergées en 30 j)

Description

📚 Documentation

I have generates the OpenAPI file with buf but for me it is not clear how can I add the swagger-ui to my gateway service. I have bind the the gateway-handler and this works. I would like to add a second path localhost:8081/doc a swagger-ui, so it is possible to show / test the gateway via REST request. Could be added an example to the documentation for adding the swagger-ui? I have got some open questions:

  • Did I need additional dependencies?
  • Can I build with buf the stub for the HTTP server?
  • Did I need some middelware component?
  • How can bind the mux of the grpc-gateway with the swagger-ui together?

Guide contributeur