diff --git a/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache b/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache index 7f197ef5f0ff..153ffa6d00bd 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = "{{{basePathWithoutHost}}}"; {{#appVersion}} pub const API_VERSION: &str = "{{{.}}}"; diff --git a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache index ffa36a85dbc6..cc6d895369d1 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/models.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/models.mustache @@ -8,7 +8,7 @@ use crate::header; use crate::{models, types::*}; #[allow(dead_code)] -pub type SSE = std::pin::Pin> + Send + Sync>>; +pub type SSE = std::pin::Pin> + std::marker::Send + std::marker::Sync>>; #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { diff --git a/samples/server/petstore/rust-axum/output/apikey-authorization/src/lib.rs b/samples/server/petstore/rust-axum/output/apikey-authorization/src/lib.rs index d461afebe02e..619411029944 100644 --- a/samples/server/petstore/rust-axum/output/apikey-authorization/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/apikey-authorization/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = "/v71"; pub const API_VERSION: &str = "1.0.0"; diff --git a/samples/server/petstore/rust-axum/output/apikey-authorization/src/models.rs b/samples/server/petstore/rust-axum/output/apikey-authorization/src/models.rs index 9eb40f9cd877..9c3f093a7ad4 100644 --- a/samples/server/petstore/rust-axum/output/apikey-authorization/src/models.rs +++ b/samples/server/petstore/rust-axum/output/apikey-authorization/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/apikey-auths/src/lib.rs b/samples/server/petstore/rust-axum/output/apikey-auths/src/lib.rs index d461afebe02e..619411029944 100644 --- a/samples/server/petstore/rust-axum/output/apikey-auths/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/apikey-auths/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = "/v71"; pub const API_VERSION: &str = "1.0.0"; diff --git a/samples/server/petstore/rust-axum/output/apikey-auths/src/models.rs b/samples/server/petstore/rust-axum/output/apikey-auths/src/models.rs index 9eb40f9cd877..9c3f093a7ad4 100644 --- a/samples/server/petstore/rust-axum/output/apikey-auths/src/models.rs +++ b/samples/server/petstore/rust-axum/output/apikey-auths/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/src/lib.rs b/samples/server/petstore/rust-axum/output/multipart-v3/src/lib.rs index cc053adc1ca5..ea9c8de34b6f 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/multipart-v3/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "1.0.7"; diff --git a/samples/server/petstore/rust-axum/output/multipart-v3/src/models.rs b/samples/server/petstore/rust-axum/output/multipart-v3/src/models.rs index 918f39a7fa37..dad6f8bc2d5b 100644 --- a/samples/server/petstore/rust-axum/output/multipart-v3/src/models.rs +++ b/samples/server/petstore/rust-axum/output/multipart-v3/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/src/lib.rs b/samples/server/petstore/rust-axum/output/openapi-v3/src/lib.rs index cc053adc1ca5..ea9c8de34b6f 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/openapi-v3/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "1.0.7"; diff --git a/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs b/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs index 22ccac1d4315..679c17f36cc0 100644 --- a/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs +++ b/samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/ops-v3/src/lib.rs b/samples/server/petstore/rust-axum/output/ops-v3/src/lib.rs index bfdd7c899236..b9efa68d49c1 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/ops-v3/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "0.0.1"; diff --git a/samples/server/petstore/rust-axum/output/ops-v3/src/models.rs b/samples/server/petstore/rust-axum/output/ops-v3/src/models.rs index 70fa12a8ed93..0fd4ca1e0612 100644 --- a/samples/server/petstore/rust-axum/output/ops-v3/src/models.rs +++ b/samples/server/petstore/rust-axum/output/ops-v3/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs index 91d8f87a36a8..071b66d420a4 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = "/v2"; pub const API_VERSION: &str = "1.0.0"; diff --git a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs index e47738e7fa72..5483af09a957 100644 --- a/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs +++ b/samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/petstore/src/lib.rs b/samples/server/petstore/rust-axum/output/petstore/src/lib.rs index 91d8f87a36a8..071b66d420a4 100644 --- a/samples/server/petstore/rust-axum/output/petstore/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/petstore/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = "/v2"; pub const API_VERSION: &str = "1.0.0"; diff --git a/samples/server/petstore/rust-axum/output/petstore/src/models.rs b/samples/server/petstore/rust-axum/output/petstore/src/models.rs index 70dab700257e..1a8679a0617e 100644 --- a/samples/server/petstore/rust-axum/output/petstore/src/models.rs +++ b/samples/server/petstore/rust-axum/output/petstore/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/lib.rs b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/lib.rs index 127b67da835e..16bdc1559d6e 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "1.0"; diff --git a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/models.rs b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/models.rs index 70fa12a8ed93..0fd4ca1e0612 100644 --- a/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/models.rs +++ b/samples/server/petstore/rust-axum/output/ping-bearer-auth/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/lib.rs b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/lib.rs index bfdd7c899236..b9efa68d49c1 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "0.0.1"; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/models.rs b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/models.rs index c89e194cc6c0..d5fea6b3c719 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/models.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-array-params-test/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/lib.rs b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/lib.rs index 7f6af70e59f7..0b593a896728 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "0.1.9"; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/models.rs b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/models.rs index 6eec2068e67c..a143a801c26d 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/models.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-header-uuid/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/rust-axum-integer-types-test/src/lib.rs b/samples/server/petstore/rust-axum/output/rust-axum-integer-types-test/src/lib.rs index 128cc87575eb..a63c5aa7e55e 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-integer-types-test/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-integer-types-test/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "1.0.0"; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-integer-types-test/src/models.rs b/samples/server/petstore/rust-axum/output/rust-axum-integer-types-test/src/models.rs index 87f1b5895485..de7d5da11121 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-integer-types-test/src/models.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-integer-types-test/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/lib.rs b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/lib.rs index bfdd7c899236..b9efa68d49c1 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "0.0.1"; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/models.rs b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/models.rs index caa96343c512..8e3854c4583b 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/models.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-oneof/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/rust-axum-sse/src/lib.rs b/samples/server/petstore/rust-axum/output/rust-axum-sse/src/lib.rs index 128cc87575eb..a63c5aa7e55e 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-sse/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-sse/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "1.0.0"; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-sse/src/models.rs b/samples/server/petstore/rust-axum/output/rust-axum-sse/src/models.rs index 7b1f08360158..d622e0e78165 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-sse/src/models.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-sse/src/models.rs @@ -9,11 +9,11 @@ use crate::{models, types::*}; #[allow(dead_code)] pub type SSE = std::pin::Pin< - Box< + std::boxed::Box< dyn futures_util::Stream< - Item = Result, - > + Send - + Sync, + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, >, >; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/src/lib.rs b/samples/server/petstore/rust-axum/output/rust-axum-test/src/lib.rs index d9085fbe8b9b..91fd90013733 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "2.3.4"; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-test/src/models.rs b/samples/server/petstore/rust-axum/output/rust-axum-test/src/models.rs index a25538279865..dc87a27caac9 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-test/src/models.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-test/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new(); diff --git a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/lib.rs b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/lib.rs index bfdd7c899236..b9efa68d49c1 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/lib.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/lib.rs @@ -14,6 +14,8 @@ clippy::too_many_arguments )] +extern crate futures_util; + pub const BASE_PATH: &str = ""; pub const API_VERSION: &str = "0.0.1"; diff --git a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/models.rs b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/models.rs index 229b571c986e..bd8269f6cb10 100644 --- a/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/models.rs +++ b/samples/server/petstore/rust-axum/output/rust-axum-validation-test/src/models.rs @@ -7,6 +7,16 @@ use validator::Validate; use crate::header; use crate::{models, types::*}; +#[allow(dead_code)] +pub type SSE = std::pin::Pin< + std::boxed::Box< + dyn futures_util::Stream< + Item = std::result::Result, + > + std::marker::Send + + std::marker::Sync, + >, +>; + #[allow(dead_code)] fn from_validation_error(e: validator::ValidationError) -> validator::ValidationErrors { let mut errs = validator::ValidationErrors::new();