Skip to content

Commit

Permalink
Re-enable swagger ui
Browse files Browse the repository at this point in the history
  • Loading branch information
traxys committed Jan 21, 2025
1 parent 060ff8c commit 54b6442
Show file tree
Hide file tree
Showing 3 changed files with 219 additions and 5 deletions.
218 changes: 217 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ jwt-simple = { version = "0.12", default-features = false, features = [
"pure-rust",
] }
maud = { git = "https://github.com/lambda-fairy/maud", features = ["axum"] }
# to be update when it uses a stable axum 0.8.0 version (and when we also do)
# utoipa-swagger-ui = { version = "8.1.0", features = ["axum"] }
utoipa-swagger-ui = { version = "9.0.0", features = ["axum"] }

[dependencies.sqlx]
version = "0.8.3"
Expand Down
3 changes: 1 addition & 2 deletions api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,7 @@ async fn main() -> color_eyre::Result<()> {
.with_state(Arc::new(KabalistState { config, pool: db }));

let app = Router::new()
// to be put back when axum 0.8.0 gets stable, meaning utoipa will get updated
// .merge(utoipa_swagger_ui::SwaggerUi::new("/swagger-ui").url("/api-doc/openapi.json", ApiDoc::openapi()))
.merge(utoipa_swagger_ui::SwaggerUi::new("/swagger-ui").url("/api-doc/openapi.json", ApiDoc::openapi()))
.nest("/api", api)
.layer(
CorsLayer::new()
Expand Down

0 comments on commit 54b6442

Please sign in to comment.