Registry / web-framework / revolt-rocket-okapi

revolt-rocket-okapi

JSON →
library0.10.0rscratesunverified

OpenAPI (AKA Swagger) document generation for Rocket applications.

# Cargo.toml [dependencies] revolt_rocket_okapi = "0.10.0"
INSTALL
IMPORT
SIG · REVOLT-ROCKET-OKAP
R
revolt-rocket-okapi
web-frameworkrustv0.10.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_get_routes
use rocket_okapi::openapi_get_routes;

Generate OpenAPI documentation for Rocket routes.

use rocket_okapi::openapi_get_routes; #[rocket::get("/")] fn index() -> &'static str { "Hello, world!" } #[rocket::launch] fn rocket() -> _ { rocket::build().mount("/", openapi_get_routes![index]) }
Debug
Known issues
gotchaRequires Rocket framework and specific feature flags.
fix
Enable the 'swagger' feature in Cargo.toml.
affects: >=0.5.0
Upgrade
Version history
0.10.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
revolt-rocket-okapi — cargo add revolt-rocket-okapi · libregistry