Skip to content

Commit edc0e83

Browse files
committed
Update
1 parent 5d96de6 commit edc0e83

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

  • modules/openapi-generator/src/main/resources/rust-axum
  • samples/server/petstore/rust-axum/output

modules/openapi-generator/src/main/resources/rust-axum/models.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ pub fn check_xss_map<T>(v: &std::collections::HashMap<String, T>) -> std::result
524524
/// Enumeration of values.
525525
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
526526
/// which helps with FFI.
527-
#[allow(non_camel_case_types)]
527+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
528528
#[repr(C)]
529529
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize)]
530530
#[cfg_attr(feature = "conversion", derive(frunk_enum_derive::LabelledGenericEnum))]
@@ -759,7 +759,7 @@ impl std::str::FromStr for {{{classname}}} {
759759
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
760760
#[serde(untagged)]
761761
{{/discriminator}}
762-
#[allow(non_camel_case_types)]
762+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
763763
pub enum {{{classname}}} {
764764
{{#composedSchemas}}
765765
{{#anyOf}}
@@ -834,7 +834,7 @@ impl From<{{{dataType}}}> for {{{classname}}} {
834834
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
835835
#[serde(untagged)]
836836
{{/discriminator}}
837-
#[allow(non_camel_case_types)]
837+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
838838
pub enum {{{classname}}} {
839839
{{#composedSchemas}}
840840
{{#oneOf}}

samples/server/petstore/rust-axum/output/openapi-v3/src/models.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ impl std::convert::TryFrom<HeaderValue> for header::IntoHeaderValue<AnotherXmlOb
769769

770770
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
771771
#[serde(untagged)]
772-
#[allow(non_camel_case_types)]
772+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
773773
pub enum AnyOfGet202Response {
774774
String(String),
775775
Uuid(uuid::Uuid),
@@ -809,7 +809,7 @@ impl From<uuid::Uuid> for AnyOfGet202Response {
809809
/// Test a model containing an anyOf of a hash map
810810
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
811811
#[serde(untagged)]
812-
#[allow(non_camel_case_types)]
812+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
813813
pub enum AnyOfHashMapObject {
814814
String(String),
815815
HashMapOfStringString(std::collections::HashMap<String, String>),
@@ -849,7 +849,7 @@ impl From<std::collections::HashMap<String, String>> for AnyOfHashMapObject {
849849
/// Test a model containing an anyOf
850850
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
851851
#[serde(untagged)]
852-
#[allow(non_camel_case_types)]
852+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
853853
pub enum AnyOfObject {
854854
String(String),
855855
String1(String),
@@ -1186,7 +1186,7 @@ impl std::convert::TryFrom<HeaderValue> for header::IntoHeaderValue<DuplicateXml
11861186
/// Enumeration of values.
11871187
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
11881188
/// which helps with FFI.
1189-
#[allow(non_camel_case_types)]
1189+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
11901190
#[repr(C)]
11911191
#[derive(
11921192
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize,
@@ -1473,7 +1473,7 @@ impl std::convert::TryFrom<HeaderValue> for header::IntoHeaderValue<FormTestRequ
14731473
/// Test a model containing an anyOf that starts with a number
14741474
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
14751475
#[serde(untagged)]
1476-
#[allow(non_camel_case_types)]
1476+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
14771477
pub enum Model12345AnyOfObject {
14781478
String(String),
14791479
String1(String),
@@ -2834,7 +2834,7 @@ impl std::ops::DerefMut for Ok {
28342834

28352835
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
28362836
#[serde(untagged)]
2837-
#[allow(non_camel_case_types)]
2837+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
28382838
pub enum OneOfGet200Response {
28392839
I32(i32),
28402840
VecOfString(Vec<String>),
@@ -2992,7 +2992,7 @@ impl std::ops::DerefMut for Result {
29922992
/// Enumeration of values.
29932993
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
29942994
/// which helps with FFI.
2995-
#[allow(non_camel_case_types)]
2995+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
29962996
#[repr(C)]
29972997
#[derive(
29982998
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize,

samples/server/petstore/rust-axum/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,7 +2554,7 @@ impl std::convert::TryFrom<HeaderValue> for header::IntoHeaderValue<EnumArrays>
25542554
/// Enumeration of values.
25552555
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
25562556
/// which helps with FFI.
2557-
#[allow(non_camel_case_types)]
2557+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
25582558
#[repr(C)]
25592559
#[derive(
25602560
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize,
@@ -4805,7 +4805,7 @@ impl std::convert::TryFrom<HeaderValue> for header::IntoHeaderValue<OuterComposi
48054805
/// Enumeration of values.
48064806
/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]`
48074807
/// which helps with FFI.
4808-
#[allow(non_camel_case_types)]
4808+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
48094809
#[repr(C)]
48104810
#[derive(
48114811
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize,

samples/server/petstore/rust-axum/output/rust-axum-oneof/src/models.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ impl std::convert::TryFrom<HeaderValue> for header::IntoHeaderValue<HelloD> {
974974

975975
#[derive(Debug, Clone, PartialEq, serde::Deserialize)]
976976
#[serde(tag = "op")]
977-
#[allow(non_camel_case_types)]
977+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
978978
pub enum Message {
979979
Hello(models::Hello),
980980
Greeting(models::Greeting),
@@ -1041,7 +1041,7 @@ impl From<models::SomethingCompletelyDifferent> for Message {
10411041

10421042
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
10431043
#[serde(untagged)]
1044-
#[allow(non_camel_case_types)]
1044+
#[allow(non_camel_case_types, clippy::large_enum_variant)]
10451045
pub enum SomethingCompletelyDifferent {
10461046
VecOfObject(Vec<crate::types::Object>),
10471047
Object(crate::types::Object),

0 commit comments

Comments
 (0)