Kest

Search

Search the documentation

OpenAPI

gRPC docs

The same kind of reference site for gRPC services.

Like trpc-ui for tRPC, and the OpenAPI site for REST: every service and RPC with its comments, field tables, a request skeleton, and a sandbox that calls the real server.

val proto = ProtoSchema.load("protos/shop.proto")
container.http(NettyHttpAdapter(8080)) {
    useGrpcDocs(proto) { title = "Shop gRPC API"; targetHost = "localhost"; targetPort = 5000 }       // http://localhost:8080/grpc-docs
}
  • // comments above a service, RPC, message or field become the documentation. GET /grpc-docs/schema.json returns the same model.
  • The sandbox sends requests through this application (browsers cannot speak gRPC) to targetHost:targetPort: unary, server-streaming (cut after maxStreamMessages) and client-streaming calls (a list of messages), with metadata such as authorization. Bidirectional streams are documented but cannot be called.
  • Without targetHost the page is documentation only and no proxy endpoint exists. In production set sandbox = false or authorize = { request -> ... }: the sandbox lets whoever opens the page call your gRPC server.

Read more