Registry / web-framework / utoipa

utoipa

JSON →
library5.5.0rscratesunverified

Compile time generated OpenAPI documentation for Rust.

# Cargo.toml [dependencies] utoipa = "5.5.0"
INSTALL
IMPORT
SIG · UTOIPA
U
utoipa
web-frameworkrustv5.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OpenApi
use utoipa::OpenApi;

Derives OpenAPI documentation and prints it as JSON.

use utoipa::OpenApi; #[derive(OpenApi)] #[openapi(paths = [])] struct ApiDoc; fn main() { println!("{}", ApiDoc::openapi().to_pretty_json().unwrap()); }
Debug
Known issues
gotchaRequires the `openapi` feature for full functionality.
fix
Add `features = ["openapi"]` to your Cargo.toml dependency.
affects: >=5.0.0
Upgrade
Version history
5.5.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
utoipa — cargo add utoipa · libregistry