Registry / web-framework / utoipa-swagger-ui

utoipa-swagger-ui

JSON →
library9.0.2rscratesunverified

Provides Swagger UI integration for utoipa-based API documentation.

# Cargo.toml [dependencies] utoipa-swagger-ui = "9.0.2"
INSTALL
IMPORT
SIG · UTOIPA-SWAGGER-UI
U
utoipa-swagger-ui
web-frameworkrustv9.0.2
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.

SwaggerUi
use utoipa_swagger_ui::SwaggerUi;

Serves Swagger UI at /swagger-ui using an OpenAPI spec.

use utoipa_swagger_ui::SwaggerUi; use actix_web::{App, HttpServer}; #[actix_web::main] async fn main() -> std::io::Result<()> { HttpServer::new(|| { App::new() .service(SwaggerUi::new("/swagger-ui/{_:.*}").url("/api-doc/openapi.json", openapi_doc())) }) .bind("127.0.0.1:8080")? .run() .await }
Debug
Known issues
gotchaRequires the utoipa crate and a web framework like actix-web or axum.
fix
Add utoipa and a web framework as dependencies.
affects: >=9.0.0
Upgrade
Version history
9.0.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources