| Crates.io | axum-swagger-ui |
| lib.rs | axum-swagger-ui |
| version | 0.3.0 |
| created_at | 2022-11-09 06:03:24.941571+00 |
| updated_at | 2023-12-02 07:07:54.174509+00 |
| description | A simple swagger ui integration for axum |
| homepage | https://github.com/tyrchen/axum-swagger-ui |
| repository | https://github.com/tyrchen/axum-swagger-ui |
| max_upload_size | |
| id | 708576 |
| size | 20,123 |
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!" }));