diff --git a/Cargo.toml b/Cargo.toml index 32de6551..6740c84e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,8 +97,6 @@ prometheus = "0.13" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } -pin-project-lite = "0.2" - [workspace.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] diff --git a/examples/routing/openapi/Cargo.toml b/examples/routing/openapi/Cargo.toml index 4af2d3f0..9b7fa56b 100644 --- a/examples/routing/openapi/Cargo.toml +++ b/examples/routing/openapi/Cargo.toml @@ -12,5 +12,5 @@ serde = { workspace = true, features = ["derive"] } serde_json.workspace = true tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } -utoipa = "3.4.0" -utoipa-swagger-ui = "3.1.4" +utoipa = "4.0" +utoipa-swagger-ui = "4.0" diff --git a/examples/routing/openapi/src/main.rs b/examples/routing/openapi/src/main.rs index 76785c23..e91294e8 100644 --- a/examples/routing/openapi/src/main.rs +++ b/examples/routing/openapi/src/main.rs @@ -319,7 +319,16 @@ async fn main() -> Result<(), Error> { "/api-doc/openapi.json", openapi_json.with(State::new(apidoc)), ) - .get("/swagger-ui/*", swagger_ui.with(State::new(config))); + .get("/swagger-ui/*", swagger_ui.with(State::new(config))) + .get("/", |_| async move { + Ok(Response::html( + r#" + <a href="/swagger-ui/">Swagger UI</a> + <br /> + <a href="/api-doc/openapi.json">OpenAPI JSON</a> + "#, + )) + }); let tree = Arc::new(Tree::from(app)); loop { diff --git a/viz-core/Cargo.toml b/viz-core/Cargo.toml index a141dfd5..13605439 100644 --- a/viz-core/Cargo.toml +++ b/viz-core/Cargo.toml @@ -96,7 +96,6 @@ tokio = { workspace = true, optional = true } tokio-tungstenite = { workspace = true, optional = true } tokio-stream = { workspace = true, optional = true } tokio-util = { workspace = true, optional = true } -pin-project-lite.workspace = true [dev-dependencies] viz = { workspace = true, features = ["session"] }