diff --git a/modules/openapi-generator/src/main/resources/rust/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust/Cargo.mustache index 6a9676d733f..30f73e87824 100644 --- a/modules/openapi-generator/src/main/resources/rust/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust/Cargo.mustache @@ -63,13 +63,13 @@ secrecy = "0.8.0" {{/withAWSV4Signature}} {{#reqwest}} {{^supportAsync}} -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } {{#supportMiddleware}} reqwest-middleware = { version = "^0.4", features = ["json", "blocking", "multipart"] } {{/supportMiddleware}} {{/supportAsync}} {{#supportAsync}} -reqwest = { version = "^0.12", features = ["json", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } {{#supportMiddleware}} reqwest-middleware = { version = "^0.4", features = ["json", "multipart"] } {{/supportMiddleware}} @@ -82,7 +82,7 @@ google-cloud-token = "^0.1" {{/reqwest}} {{#reqwestTrait}} async-trait = "^0.1" -reqwest = { version = "^0.12", features = ["json", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } {{#supportMiddleware}} reqwest-middleware = { version = "^0.4", features = ["json", "multipart"] } {{/supportMiddleware}} @@ -97,6 +97,9 @@ mockall = { version = "^0.13", optional = true} bon = { version = "2.3", optional = true } {{/useBonBuilder}} [features] +default = ["native-tls"] +native-tls = ["reqwest/native-tls"] +rustls = ["reqwest/rustls-tls"] {{#mockall}} mockall = ["dep:mockall"] {{/mockall}} diff --git a/samples/client/others/rust/reqwest-regression-16119/Cargo.toml b/samples/client/others/rust/reqwest-regression-16119/Cargo.toml index 0712b88be4f..c035a20d87c 100644 --- a/samples/client/others/rust/reqwest-regression-16119/Cargo.toml +++ b/samples/client/others/rust/reqwest-regression-16119/Cargo.toml @@ -12,4 +12,4 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } diff --git a/samples/client/others/rust/reqwest/api-with-ref-param/Cargo.toml b/samples/client/others/rust/reqwest/api-with-ref-param/Cargo.toml index 7b36f89b940..e65f10fdd7e 100644 --- a/samples/client/others/rust/reqwest/api-with-ref-param/Cargo.toml +++ b/samples/client/others/rust/reqwest/api-with-ref-param/Cargo.toml @@ -12,4 +12,4 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -reqwest = { version = "^0.12", features = ["json", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } diff --git a/samples/client/others/rust/reqwest/composed-oneof/Cargo.toml b/samples/client/others/rust/reqwest/composed-oneof/Cargo.toml index 2a7c3a43bb7..141bc553998 100644 --- a/samples/client/others/rust/reqwest/composed-oneof/Cargo.toml +++ b/samples/client/others/rust/reqwest/composed-oneof/Cargo.toml @@ -12,4 +12,4 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } diff --git a/samples/client/others/rust/reqwest/emptyObject/Cargo.toml b/samples/client/others/rust/reqwest/emptyObject/Cargo.toml index bf65d42d4cc..e395f3c3557 100644 --- a/samples/client/others/rust/reqwest/emptyObject/Cargo.toml +++ b/samples/client/others/rust/reqwest/emptyObject/Cargo.toml @@ -12,4 +12,4 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } diff --git a/samples/client/others/rust/reqwest/oneOf-array-map/Cargo.toml b/samples/client/others/rust/reqwest/oneOf-array-map/Cargo.toml index 509f9c6d885..205693518c7 100644 --- a/samples/client/others/rust/reqwest/oneOf-array-map/Cargo.toml +++ b/samples/client/others/rust/reqwest/oneOf-array-map/Cargo.toml @@ -12,4 +12,4 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } diff --git a/samples/client/others/rust/reqwest/oneOf-reuseRef/Cargo.toml b/samples/client/others/rust/reqwest/oneOf-reuseRef/Cargo.toml index 58b7a46e045..a2bf4f1e5e7 100644 --- a/samples/client/others/rust/reqwest/oneOf-reuseRef/Cargo.toml +++ b/samples/client/others/rust/reqwest/oneOf-reuseRef/Cargo.toml @@ -11,4 +11,4 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } diff --git a/samples/client/others/rust/reqwest/oneOf/Cargo.toml b/samples/client/others/rust/reqwest/oneOf/Cargo.toml index 0af49f66158..62b0f54725b 100644 --- a/samples/client/others/rust/reqwest/oneOf/Cargo.toml +++ b/samples/client/others/rust/reqwest/oneOf/Cargo.toml @@ -12,4 +12,4 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } diff --git a/samples/client/petstore/rust/reqwest-trait/petstore/Cargo.toml b/samples/client/petstore/rust/reqwest-trait/petstore/Cargo.toml index d7680f4dfa7..dc371c0e02f 100644 --- a/samples/client/petstore/rust/reqwest-trait/petstore/Cargo.toml +++ b/samples/client/petstore/rust/reqwest-trait/petstore/Cargo.toml @@ -14,7 +14,10 @@ serde_repr = "^0.1" url = "^2.5" uuid = { version = "^1.8", features = ["serde", "v4"] } async-trait = "^0.1" -reqwest = { version = "^0.12", features = ["json", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } mockall = { version = "^0.13", optional = true} [features] +default = ["native-tls"] +native-tls = ["reqwest/native-tls"] +rustls = ["reqwest/rustls-tls"] mockall = ["dep:mockall"] diff --git a/samples/client/petstore/rust/reqwest/name-mapping/Cargo.toml b/samples/client/petstore/rust/reqwest/name-mapping/Cargo.toml index 99c54a81fd2..49064b4efe1 100644 --- a/samples/client/petstore/rust/reqwest/name-mapping/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/name-mapping/Cargo.toml @@ -11,4 +11,4 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-async-middleware/Cargo.toml index fffdc08ec2f..3ffc4578aa7 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-middleware/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/Cargo.toml @@ -13,5 +13,5 @@ serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" uuid = { version = "^1.8", features = ["serde", "v4"] } -reqwest = { version = "^0.12", features = ["json", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } reqwest-middleware = { version = "^0.4", features = ["json", "multipart"] } diff --git a/samples/client/petstore/rust/reqwest/petstore-async-tokensource/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-async-tokensource/Cargo.toml index 811475c96e1..506ad8b82ea 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-tokensource/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore-async-tokensource/Cargo.toml @@ -13,7 +13,7 @@ serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" uuid = { version = "^1.8", features = ["serde", "v4"] } -reqwest = { version = "^0.12", features = ["json", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } async-trait = "^0.1" # TODO: propose to Yoshidan to externalize this as non google related crate, so that it can easily be extended for other cloud providers. google-cloud-token = "^0.1" diff --git a/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml index 3803423fe92..4810b504926 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore-async/Cargo.toml @@ -13,4 +13,4 @@ serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" uuid = { version = "^1.8", features = ["serde", "v4"] } -reqwest = { version = "^0.12", features = ["json", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } diff --git a/samples/client/petstore/rust/reqwest/petstore-avoid-box/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-avoid-box/Cargo.toml index a3312a3a7ee..d656c944f26 100644 --- a/samples/client/petstore/rust/reqwest/petstore-avoid-box/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore-avoid-box/Cargo.toml @@ -13,4 +13,4 @@ serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" uuid = { version = "^1.8", features = ["serde", "v4"] } -reqwest = { version = "^0.12", features = ["json", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/Cargo.toml index d5a2bac56a2..d08f8c318d3 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/Cargo.toml @@ -16,4 +16,4 @@ uuid = { version = "^1.8", features = ["serde", "v4"] } aws-sigv4 = "0.3.0" http = "0.2.5" secrecy = "0.8.0" -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } diff --git a/samples/client/petstore/rust/reqwest/petstore-model-name-prefix/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-model-name-prefix/Cargo.toml index 4696d501ae9..515c648ce6e 100644 --- a/samples/client/petstore/rust/reqwest/petstore-model-name-prefix/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore-model-name-prefix/Cargo.toml @@ -13,4 +13,4 @@ serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" uuid = { version = "^1.8", features = ["serde", "v4"] } -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] } diff --git a/samples/client/petstore/rust/reqwest/petstore/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore/Cargo.toml index 0dd7e914941..ffdafb348dc 100644 --- a/samples/client/petstore/rust/reqwest/petstore/Cargo.toml +++ b/samples/client/petstore/rust/reqwest/petstore/Cargo.toml @@ -13,4 +13,4 @@ serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" uuid = { version = "^1.8", features = ["serde", "v4"] } -reqwest = { version = "^0.12", features = ["json", "blocking", "multipart"] } +reqwest = { version = "^0.12", default-features = false, features = ["json", "blocking", "multipart"] }