#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

#1552 in Development tools

Download history 262/week @ 2024-08-14 128/week @ 2024-08-21 94/week @ 2024-08-28 123/week @ 2024-09-04 188/week @ 2024-09-11 232/week @ 2024-09-18 211/week @ 2024-09-25 137/week @ 2024-10-02 115/week @ 2024-10-09 96/week @ 2024-10-16 102/week @ 2024-10-23 151/week @ 2024-10-30 97/week @ 2024-11-06 124/week @ 2024-11-13 79/week @ 2024-11-20 62/week @ 2024-11-27

382 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