#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

#1123 in Development tools

Download history 225/week @ 2024-07-22 273/week @ 2024-07-29 158/week @ 2024-08-05 293/week @ 2024-08-12 136/week @ 2024-08-19 116/week @ 2024-08-26 80/week @ 2024-09-02 142/week @ 2024-09-09 292/week @ 2024-09-16 195/week @ 2024-09-23 150/week @ 2024-09-30 135/week @ 2024-10-07 99/week @ 2024-10-14 101/week @ 2024-10-21 132/week @ 2024-10-28 146/week @ 2024-11-04

488 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