Rust macros to automatically discover and add Utoipa paths and schemas at compile time, eliminating manual OpenAPI documentation boilerplate.
Utoipauto is a Rust procedural macro crate that automates the discovery and registration of API endpoints and data models for Utoipa-based OpenAPI documentation. It solves the problem of manually maintaining large OpenAPI definitions by scanning source code at compile time, simulating runtime reflection in Rust's static environment. This drastically reduces boilerplate and human error in projects with hundreds or thousands of endpoints.
Rust developers building web APIs with Utoipa who want to automate OpenAPI/Swagger documentation generation, especially those maintaining large codebases where manual endpoint registration is cumbersome.
Developers choose Utoipauto because it eliminates the verbose, error-prone task of manually listing every path and schema in Utoipa's `#[openapi]` macro. Its compile-time scanning ensures documentation stays synchronized with code, supports complex project structures like workspaces, and offers customization without sacrificing automation.
Rust Macros to automate the addition of Paths/Schemas to Utoipa crate, simulating Reflection during the compilation phase
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Recursively discovers functions annotated with #[utoipa::path(...)] across modules, eliminating manual listing for large codebases, as shown in examples with hundreds of endpoints.
Identifies structs deriving ToSchema or ToResponse, automatically populating OpenAPI components without explicit registration, reducing boilerplate and errors.
Supports Cargo workspaces and cross-crate dependencies with specific path syntax, allowing seamless documentation generation in complex project structures.
Offers custom attribute names, exclusions via #[utoipa_ignore], and targeted scanning, providing fine-grained control while maintaining automation.
Requires manual path strings for modules and workspaces, which can be error-prone and verbose, as highlighted in the workspace usage examples.
Adds to compile time due to source code scanning at compile time, potentially slowing down development cycles in large projects.
Only works with Utoipa; switching to other OpenAPI generation crates would require significant code changes, creating vendor lock-in.