3 ms·
How are you using this web site? The entire thing is "discoverable". What you're talking about is how can you publish a machine readable discoverable API. Just
by rswail 4y ago
How are you using this web site? The entire thing is "discoverable".
What you're talking about is how can you publish a machine readable discoverable API. Just like RPC, there is no "well known" endpoint for getting the API specification.
The RPC IDL is effectively the same as "go read the docs". How is downloading a "formal published IDL" any different to a "formal published OpenAPI specification"?
gRPC just has an entire infrastructure of compilers, parsers and language libraries that generate stub code that you then have to go and "fill in".
OpenAPI is a pretty good standard for defining an HTTP based REST API.
- tweenagedream 4y agoFor gRPC, the protobuf is the API specification, a service definition with endpoints, what requests to those endpoints should look like and what responses look like. Of course, there are better and worse implementations, e.g. a well commented proto definition explaining what various args do, etc. In gRPC the definition is a requirement to use, so at the bare minimum you have the typed structure of requests and responses. There is no such requirement for REST
- jeffbee 4y agogRPC has well-known services ServerReflection and ProtoDescriptorDatabase that allow clients to discover all available services, create request bodies, and parse response bodies, without having built-in protocol definitions. It is more discoverable than vanilla REST.