Open pjz opened 5 years ago
The return type of these api are dynamically generated class from the swagger specs.
So it's kinda hard to document. Cause when I doc a rtype like :rtype: etcdserverpbSnapshotResponse
is not pointing to any code.
Maybe I can manage to hardcode those model classes in the future 😃 . Or make a live document use swagger UI.
For now, you can view these document using swagger HUB:
...can I ask why protobufs are even involved? They're not part of the etcd API, are they?
https://github.com/etcd-io/etcd/blob/master/Documentation/dev-guide/api_grpc_gateway.md
etcd v3 uses gRPC for its messaging protocol. The etcd project includes a gRPC-based Go client and a command line utility, etcdctl, for communicating with an etcd cluster through gRPC. For languages with no gRPC support, etcd provides a JSON gRPC gateway. This gateway serves a RESTful proxy that translates HTTP/JSON requests into gRPC messages.
The command documentation is really nice; if all else fails, I can read the code (which is well documented). What's less documented is the return values and the types of the return values... could someone take a swing at that?