The primary CLI interaction uses the cdd-rust executable.
-
cdd-rust from_openapi <command> -i <input.yaml> -o <out_dir>Generate code starting from an OpenAPI specification. Commands include:to_sdk_cli: Generate an offline-first Clap CLI SDK.to_sdk: Generate a Reqwest API client.to_server: Generate an Actix-web server scaffold.
-
cdd-rust to_openapi -f <src_dir> -o <spec.yaml>Parse an existing Actix-web or generic Rust workspace and build an OpenAPI spec. -
cdd-rust to_docs_json -i <spec.yaml> -o <docs.json>Format the spec into a JSON format used directly by the central CDD documentation site. -
cdd-rust serve_json_rpc --port 8082Host the full CLI capability as a JSON-RPC 2.0 interface.
- Define a basic handler with
actix-webmacros in your project. - Run
cdd-rust to_openapi -f src/api -o output.yaml. - An
output.yamlfile natively reflecting your Rust structs and handlers is created.
- Use an OpenAPI 3.2.0 yaml or json spec.
- Run
cdd-rust from_openapi to_server -i openapi.yaml -o my_actix_app. - The tool generates Actix scaffolding in
my_actix_app/handlers/, Diesel models inmy_actix_app/models/, and tests inmy_actix_app/tests/.