From 96ee2207e65391388fdbab3e6398c9e12a44eaf0 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Thu, 15 Feb 2024 22:09:27 +0100 Subject: [PATCH 1/2] Move tokio to dev dependencies It is only directly needed in the examples. Having tokio with features = [ "full" ] as a dependency means that applications can't select less features for their usage of tokio. --- oasgen/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oasgen/Cargo.toml b/oasgen/Cargo.toml index 5460d36..f29a765 100644 --- a/oasgen/Cargo.toml +++ b/oasgen/Cargo.toml @@ -50,7 +50,6 @@ oasgen-macro = { path = "../macro", version = "0.20.1"} serde = { version = "1.0.171", features = ["derive"] } serde_json = "1.0.100" serde_yaml = "0.9.22" -tokio = { version = "1.29.1", features = ["full"] } swagger-ui2 = { version = "0.6", optional = true, path = "../swagger-ui" } tower-cookies = { version = "0.10.0", optional = true } regex = "1.9.1" @@ -77,3 +76,4 @@ bigdecimal = ["oasgen-core/bigdecimal"] trybuild = "1.0.81" actix-web = { version = "4.3.1" } pretty_assertions = "1.4.0" +tokio = { version = "1.29.1", features = ["full"] } From fd8e57c2db9469d420e4e07093ddc61a1be91834 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Thu, 15 Feb 2024 22:10:29 +0100 Subject: [PATCH 2/2] Enable only selecte features for axum This allows users of the library to disable-default features of axum --- oasgen/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oasgen/Cargo.toml b/oasgen/Cargo.toml index f29a765..6b52185 100644 --- a/oasgen/Cargo.toml +++ b/oasgen/Cargo.toml @@ -40,7 +40,7 @@ required-features = ["axum"] [dependencies] inventory = "0.3.13" actix-web = { version = "4.3.1", optional = true } -axum = { version = "0.7.4", optional = true, features = ["json"] } +axum = { version = "0.7.4", optional = true, default-features = false, features = ["json"] } futures = "0.3.28" http = "1.0.0" indexmap = "2"