granc/granc-core/Cargo.toml
Víctor Martínez c9ef611e07
[feat] Generate markdown documentation for gRPC services (#46)
This PR implements a new subcommand `doc` that 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 `Packages` type has been implemented to transform a `ServiceDescriptor` into a map of `Package`s.

Each package groups all the file descriptors with the same package name (or namespace).

A `Package` contains 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-support` crate**

* Renamed the `echo_service` crate as `granc-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, the `call` command 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:**

* Added `name`, `full_name`, and `package_name` methods to the `Descriptor` enum to simplify access to descriptor metadata. (`granc-core/src/client/types.rs`)

**Dependency Management Improvements:**

* Added grouping for gRPC-related dependencies in `dependabot.yml` for improved automated dependency updates. (`.github/dependabot.yml`)
2026-02-06 13:16:19 +01:00

36 lines
1,012 B
TOML

[package]
authors = { workspace = true }
categories = ["network-programming"]
description = "Cranc gRPC CLI core library"
edition = { workspace = true }
homepage = { workspace = true }
keywords = ["grpc", "network-programming", "grpc-reflection"]
license = { workspace = true }
name = "granc_core"
publish = true
readme = "README.md"
repository = { workspace = true }
rust-version = { workspace = true }
version = "0.6.0"
[lib]
name = "granc_core"
path = "src/lib.rs"
[dependencies]
futures-util = "0.3.31"
http = "1.4.0"
http-body = "1.0.1"
prost = { workspace = true }
prost-reflect = { workspace = true, features = ["serde"] }
prost-types = { workspace = true }
serde_json = { workspace = true }
thiserror = "2.0.18"
tokio = { workspace = true, features = ["sync"] }
tokio-stream = "0.1.18"
tonic = { workspace = true }
tonic-reflection = { workspace = true }
[dev-dependencies]
granc-test-support = { path = "../granc-test-support" }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }