[feat] Generate markdown documentation for gRPC services#46
Conversation
e1b8fb7 to
688804a
Compare
|
Gemini's two cents on the choice of making this a separate command: Yes, I strictly believe that having a separate Here is the breakdown of why, along with alternative UX strategies to consider. Why
|
688804a to
75b34c1
Compare
2b7b34b to
9ac4e60
Compare
ef37df7 to
7594724
Compare
This PR implements a new subcommand
docthat generates markdown documentation for a given gRPC service!Description
For the most part, the inner logic of this subcommand is the same as the
describe, the only thing that changes is the way that the found descriptor is transformed to a final output.In this case, a
Packagestype has been implemented to transform aServiceDescriptorinto a map ofPackages.Each package groups all the file descriptors with the same package name (or namespace).
A
Packagecontains all the necessary information for a file of documentation to be generated (All its contained services, messages and enum descriptors and its name).The output of this command is a folder with all the generated documentation, which contains a file per protobuf package.
Introduced the
granc-test-supportcrateecho_servicecrate asgranc-test-support, providing both the definition of a protobuf service for integration testing and a function to compile protobuffer at runtime into a file descriptor (Potentially this could be used to let users pass a folder to a proto project in addition to the server reflection and the local file descriptor options. For example, thecallcommand could compile a file descriptor on the fly from a folder containing a protobuffer project before making the call to the gRPC server.Descriptor API Enhancements:
name,full_name, andpackage_namemethods to theDescriptorenum to simplify access to descriptor metadata. (granc-core/src/client/types.rs)Dependency Management Improvements:
dependabot.ymlfor improved automated dependency updates. (.github/dependabot.yml)