From ac649b2e2f66ee82d2f4a26a0695b76f74c0ec28 Mon Sep 17 00:00:00 2001 From: Max Nachlinger Date: Tue, 7 May 2024 20:52:20 -0700 Subject: [PATCH] Disable clippy::too_many_arguments in generated Rust client code. (#18601) --- .../src/main/resources/rust-axum/lib.mustache | 8 ++++++-- .../src/main/resources/rust-server/lib.mustache | 2 +- .../src/main/resources/rust/lib.mustache | 1 + .../others/rust/hyper/api-with-ref-param/src/lib.rs | 1 + .../client/others/rust/hyper/composed-oneof/src/lib.rs | 1 + samples/client/others/rust/hyper/emptyObject/src/lib.rs | 1 + .../client/others/rust/hyper/oneOf-array-map/src/lib.rs | 1 + .../client/others/rust/hyper/oneOf-reuseRef/src/lib.rs | 1 + samples/client/others/rust/hyper/oneOf/src/lib.rs | 1 + .../others/rust/reqwest-regression-16119/src/lib.rs | 1 + .../others/rust/reqwest/api-with-ref-param/src/lib.rs | 1 + .../client/others/rust/reqwest/composed-oneof/src/lib.rs | 1 + samples/client/others/rust/reqwest/emptyObject/src/lib.rs | 1 + .../client/others/rust/reqwest/oneOf-array-map/src/lib.rs | 1 + .../client/others/rust/reqwest/oneOf-reuseRef/src/lib.rs | 1 + samples/client/others/rust/reqwest/oneOf/src/lib.rs | 1 + samples/client/petstore/rust/hyper/petstore/src/lib.rs | 1 + .../client/petstore/rust/reqwest/name-mapping/src/lib.rs | 1 + .../rust/reqwest/petstore-async-middleware/src/lib.rs | 1 + .../petstore/rust/reqwest/petstore-async/src/lib.rs | 1 + .../petstore/rust/reqwest/petstore-avoid-box/src/lib.rs | 1 + .../rust/reqwest/petstore-awsv4signature/src/lib.rs | 1 + samples/client/petstore/rust/reqwest/petstore/src/lib.rs | 1 + .../petstore/rust-server/output/multipart-v3/src/lib.rs | 2 +- .../petstore/rust-server/output/no-example-v3/src/lib.rs | 2 +- .../petstore/rust-server/output/openapi-v3/src/lib.rs | 2 +- .../server/petstore/rust-server/output/ops-v3/src/lib.rs | 2 +- .../src/lib.rs | 2 +- .../rust-server/output/ping-bearer-auth/src/lib.rs | 2 +- .../rust-server/output/rust-server-test/src/lib.rs | 2 +- 30 files changed, 35 insertions(+), 10 deletions(-) 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 d96088f86a4..b0b755b131f 100644 --- a/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache +++ b/modules/openapi-generator/src/main/resources/rust-axum/lib.mustache @@ -6,9 +6,13 @@ unused_extern_crates, non_camel_case_types, unused_imports, - unused_attributes + unused_attributes, +)] +#![allow( + clippy::derive_partial_eq_without_eq, + clippy::disallowed_names, + clippy::too_many_arguments )] -#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] use async_trait::async_trait; use axum::extract::*; diff --git a/modules/openapi-generator/src/main/resources/rust-server/lib.mustache b/modules/openapi-generator/src/main/resources/rust-server/lib.mustache index f82fe6f424e..cbd262e97f1 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/lib.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/lib.mustache @@ -1,6 +1,6 @@ #![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] #![allow(unused_imports, unused_attributes)] -#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names, clippy::too_many_arguments)] use async_trait::async_trait; use futures::Stream; diff --git a/modules/openapi-generator/src/main/resources/rust/lib.mustache b/modules/openapi-generator/src/main/resources/rust/lib.mustache index 03ee005ea4c..c9f5913ae81 100644 --- a/modules/openapi-generator/src/main/resources/rust/lib.mustache +++ b/modules/openapi-generator/src/main/resources/rust/lib.mustache @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/hyper/api-with-ref-param/src/lib.rs b/samples/client/others/rust/hyper/api-with-ref-param/src/lib.rs index b49043ca040..290e1b7b927 100644 --- a/samples/client/others/rust/hyper/api-with-ref-param/src/lib.rs +++ b/samples/client/others/rust/hyper/api-with-ref-param/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/hyper/composed-oneof/src/lib.rs b/samples/client/others/rust/hyper/composed-oneof/src/lib.rs index b49043ca040..290e1b7b927 100644 --- a/samples/client/others/rust/hyper/composed-oneof/src/lib.rs +++ b/samples/client/others/rust/hyper/composed-oneof/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/hyper/emptyObject/src/lib.rs b/samples/client/others/rust/hyper/emptyObject/src/lib.rs index b49043ca040..290e1b7b927 100644 --- a/samples/client/others/rust/hyper/emptyObject/src/lib.rs +++ b/samples/client/others/rust/hyper/emptyObject/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/hyper/oneOf-array-map/src/lib.rs b/samples/client/others/rust/hyper/oneOf-array-map/src/lib.rs index b49043ca040..290e1b7b927 100644 --- a/samples/client/others/rust/hyper/oneOf-array-map/src/lib.rs +++ b/samples/client/others/rust/hyper/oneOf-array-map/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/hyper/oneOf-reuseRef/src/lib.rs b/samples/client/others/rust/hyper/oneOf-reuseRef/src/lib.rs index b49043ca040..290e1b7b927 100644 --- a/samples/client/others/rust/hyper/oneOf-reuseRef/src/lib.rs +++ b/samples/client/others/rust/hyper/oneOf-reuseRef/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/hyper/oneOf/src/lib.rs b/samples/client/others/rust/hyper/oneOf/src/lib.rs index b49043ca040..290e1b7b927 100644 --- a/samples/client/others/rust/hyper/oneOf/src/lib.rs +++ b/samples/client/others/rust/hyper/oneOf/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/reqwest-regression-16119/src/lib.rs b/samples/client/others/rust/reqwest-regression-16119/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/others/rust/reqwest-regression-16119/src/lib.rs +++ b/samples/client/others/rust/reqwest-regression-16119/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/reqwest/api-with-ref-param/src/lib.rs b/samples/client/others/rust/reqwest/api-with-ref-param/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/others/rust/reqwest/api-with-ref-param/src/lib.rs +++ b/samples/client/others/rust/reqwest/api-with-ref-param/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/reqwest/composed-oneof/src/lib.rs b/samples/client/others/rust/reqwest/composed-oneof/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/others/rust/reqwest/composed-oneof/src/lib.rs +++ b/samples/client/others/rust/reqwest/composed-oneof/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/reqwest/emptyObject/src/lib.rs b/samples/client/others/rust/reqwest/emptyObject/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/others/rust/reqwest/emptyObject/src/lib.rs +++ b/samples/client/others/rust/reqwest/emptyObject/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/reqwest/oneOf-array-map/src/lib.rs b/samples/client/others/rust/reqwest/oneOf-array-map/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/others/rust/reqwest/oneOf-array-map/src/lib.rs +++ b/samples/client/others/rust/reqwest/oneOf-array-map/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/reqwest/oneOf-reuseRef/src/lib.rs b/samples/client/others/rust/reqwest/oneOf-reuseRef/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/others/rust/reqwest/oneOf-reuseRef/src/lib.rs +++ b/samples/client/others/rust/reqwest/oneOf-reuseRef/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/others/rust/reqwest/oneOf/src/lib.rs b/samples/client/others/rust/reqwest/oneOf/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/others/rust/reqwest/oneOf/src/lib.rs +++ b/samples/client/others/rust/reqwest/oneOf/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/petstore/rust/hyper/petstore/src/lib.rs b/samples/client/petstore/rust/hyper/petstore/src/lib.rs index b49043ca040..290e1b7b927 100644 --- a/samples/client/petstore/rust/hyper/petstore/src/lib.rs +++ b/samples/client/petstore/rust/hyper/petstore/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/petstore/rust/reqwest/name-mapping/src/lib.rs b/samples/client/petstore/rust/reqwest/name-mapping/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/petstore/rust/reqwest/name-mapping/src/lib.rs +++ b/samples/client/petstore/rust/reqwest/name-mapping/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/lib.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/lib.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/lib.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/lib.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/petstore/rust/reqwest/petstore-avoid-box/src/lib.rs b/samples/client/petstore/rust/reqwest/petstore-avoid-box/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/petstore/rust/reqwest/petstore-avoid-box/src/lib.rs +++ b/samples/client/petstore/rust/reqwest/petstore-avoid-box/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/lib.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/lib.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/lib.rs b/samples/client/petstore/rust/reqwest/petstore/src/lib.rs index 1ac114198fd..f0d1455a7ff 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/lib.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/lib.rs @@ -1,4 +1,5 @@ #![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] #[macro_use] extern crate serde_derive; diff --git a/samples/server/petstore/rust-server/output/multipart-v3/src/lib.rs b/samples/server/petstore/rust-server/output/multipart-v3/src/lib.rs index 6d043d4a086..ea2a11d63da 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/src/lib.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/src/lib.rs @@ -1,6 +1,6 @@ #![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] #![allow(unused_imports, unused_attributes)] -#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names, clippy::too_many_arguments)] use async_trait::async_trait; use futures::Stream; diff --git a/samples/server/petstore/rust-server/output/no-example-v3/src/lib.rs b/samples/server/petstore/rust-server/output/no-example-v3/src/lib.rs index 35dd1cad90d..8c66235e7b7 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/src/lib.rs +++ b/samples/server/petstore/rust-server/output/no-example-v3/src/lib.rs @@ -1,6 +1,6 @@ #![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] #![allow(unused_imports, unused_attributes)] -#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names, clippy::too_many_arguments)] use async_trait::async_trait; use futures::Stream; diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/lib.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/lib.rs index d57ac04aef2..e7432c18c65 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/lib.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/lib.rs @@ -1,6 +1,6 @@ #![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] #![allow(unused_imports, unused_attributes)] -#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names, clippy::too_many_arguments)] use async_trait::async_trait; use futures::Stream; diff --git a/samples/server/petstore/rust-server/output/ops-v3/src/lib.rs b/samples/server/petstore/rust-server/output/ops-v3/src/lib.rs index bb16cef8ed5..38647fd39e5 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/src/lib.rs +++ b/samples/server/petstore/rust-server/output/ops-v3/src/lib.rs @@ -1,6 +1,6 @@ #![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] #![allow(unused_imports, unused_attributes)] -#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names, clippy::too_many_arguments)] use async_trait::async_trait; use futures::Stream; diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs index 17501af77f4..45d06cadaae 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs @@ -1,6 +1,6 @@ #![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] #![allow(unused_imports, unused_attributes)] -#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names, clippy::too_many_arguments)] use async_trait::async_trait; use futures::Stream; diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/src/lib.rs b/samples/server/petstore/rust-server/output/ping-bearer-auth/src/lib.rs index aa43ad0d597..5377932e173 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/src/lib.rs +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/src/lib.rs @@ -1,6 +1,6 @@ #![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] #![allow(unused_imports, unused_attributes)] -#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names, clippy::too_many_arguments)] use async_trait::async_trait; use futures::Stream; diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/lib.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/lib.rs index 01365afbb0f..06cbfc39c15 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/lib.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/lib.rs @@ -1,6 +1,6 @@ #![allow(missing_docs, trivial_casts, unused_variables, unused_mut, unused_imports, unused_extern_crates, non_camel_case_types)] #![allow(unused_imports, unused_attributes)] -#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names)] +#![allow(clippy::derive_partial_eq_without_eq, clippy::disallowed_names, clippy::too_many_arguments)] use async_trait::async_trait; use futures::Stream;