#swagger #axum #openapi

axum-swagger-ui

A simple swagger ui integration for axum

6 releases

0.3.0 Dec 2, 2023
0.2.3 Dec 2, 2023
0.2.2 Dec 30, 2022
0.2.1 Nov 26, 2022
0.1.0 Nov 9, 2022

#1577 in Development tools

Download history 312/week @ 2024-07-27 160/week @ 2024-08-03 290/week @ 2024-08-10 133/week @ 2024-08-17 116/week @ 2024-08-24 84/week @ 2024-08-31 139/week @ 2024-09-07 249/week @ 2024-09-14 237/week @ 2024-09-21 142/week @ 2024-09-28 141/week @ 2024-10-05 94/week @ 2024-10-12 104/week @ 2024-10-19 131/week @ 2024-10-26 150/week @ 2024-11-02 69/week @ 2024-11-09

470 downloads per month

MIT license

9KB

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!" }));

No runtime deps