grpcui icon indicating copy to clipboard operation
grpcui copied to clipboard

Implement in a request

Open oGabrielArruda opened this issue 3 years ago • 4 comments

Is it possible to answer a http request with the displayed content? Like swagger does, there is an endpoint that you can visualize all the data.

oGabrielArruda avatar Feb 24 '22 19:02 oGabrielArruda

I don't quite understand the request. Can you elaborate?

jhump avatar Feb 25 '22 02:02 jhump

When we use for example, Swagger to document api's. We can make a GET Route to access the UI, and visualize the documentation. Something like controller.GET("/swagger", swaggerHandle). So when I'm running my API in localhost:8080, I can hit localhost:8080/swagger to visualize the documentation. Is it possible to make something like that in grpcUI? Define a GET route to return the generated UI

oGabrielArruda avatar Feb 25 '22 11:02 oGabrielArruda

In fact I need to deploy the generated UI somewhere, and the way I think it should be easier is defining this GET route, and accessing the endpoint in the already deployed API. If you have any other ideas to deploy the UI, please tell me. I searched everywhere to something related but found nothing

oGabrielArruda avatar Feb 25 '22 11:02 oGabrielArruda

When you "visualize the documentation", what documentation? Are you talking about an endpoint to fetch the proto definitions? An HTML rendered page with... what exactly?

Maybe a screenshot of what you're talking about in postman would help.

Also, when you say "deploy the generated UI" (emphasis mine), what do you mean by "generated" UI? Do you just mean the gRPC HTML form? That can be deployed by deploying grpcui, like using the the docker image for grpcui.

jhump avatar Feb 25 '22 15:02 jhump