axum-swagger-ui

Crates.ioaxum-swagger-ui
lib.rsaxum-swagger-ui
version0.3.0
sourcesrc
created_at2022-11-09 06:03:24.941571
updated_at2023-12-02 07:07:54.174509
descriptionA simple swagger ui integration for axum
homepagehttps://github.com/tyrchen/axum-swagger-ui
repositoryhttps://github.com/tyrchen/axum-swagger-ui
max_upload_size
id708576
size20,123
Tyr Chen (tyrchen)

documentation

https://docs.rs/axum-swagger-ui

README

Swagger UI

Swagger UI code comes from: https://github.com/swagger-api/swagger-ui.

Usage:

let doc_url = "swagger/openapi.json";
let app = Router::new()
    .route("/swagger", get(|| async { swagger_ui(doc_url) }))
    .route(doc_url, get(|| async { include_str!("openapi.json") }))
    // your other routes
    .route("/", get(|| async { "Hello, World!" }));
Commit count: 10

cargo fmt