diff --git a/bin/configs/csharp-generichost-latest-allOf.yaml b/bin/configs/csharp-generichost-latest-allOf.yaml index e2b84e08d30..90a4f177ce3 100644 --- a/bin/configs/csharp-generichost-latest-allOf.yaml +++ b/bin/configs/csharp-generichost-latest-allOf.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: true + equatable: true diff --git a/bin/configs/csharp-generichost-latest-anyOf.yaml b/bin/configs/csharp-generichost-latest-anyOf.yaml index fc6e4bd4298..e4b2f31aed2 100644 --- a/bin/configs/csharp-generichost-latest-anyOf.yaml +++ b/bin/configs/csharp-generichost-latest-anyOf.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: true + equatable: true diff --git a/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml b/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml index 392e76b045f..30c8ad9fcb2 100644 --- a/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml +++ b/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml @@ -10,3 +10,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useSourceGeneration: true packageName: UseSourceGeneration + equatable: true diff --git a/bin/configs/csharp-generichost-latest-nrt.yaml b/bin/configs/csharp-generichost-latest-nrt.yaml index d5b834cf314..699fd70d3f9 100644 --- a/bin/configs/csharp-generichost-latest-nrt.yaml +++ b/bin/configs/csharp-generichost-latest-nrt.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: true + equatable: true diff --git a/bin/configs/csharp-generichost-latest-oneOf.yaml b/bin/configs/csharp-generichost-latest-oneOf.yaml index 01b2b4d7fca..5b38dc3e7fb 100644 --- a/bin/configs/csharp-generichost-latest-oneOf.yaml +++ b/bin/configs/csharp-generichost-latest-oneOf.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: true + equatable: true diff --git a/bin/configs/csharp-generichost-latest.yaml b/bin/configs/csharp-generichost-latest.yaml index e850d31280c..82360fcae46 100644 --- a/bin/configs/csharp-generichost-latest.yaml +++ b/bin/configs/csharp-generichost-latest.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false nullableReferenceTypes: false + equatable: true diff --git a/bin/configs/csharp-generichost-netstandard2.0.yaml b/bin/configs/csharp-generichost-netstandard2.0.yaml index fbe662deba0..4c9c8828291 100644 --- a/bin/configs/csharp-generichost-netstandard2.0.yaml +++ b/bin/configs/csharp-generichost-netstandard2.0.yaml @@ -9,3 +9,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false targetFramework: netstandard2.0 + equatable: true diff --git a/bin/configs/csharp-httpclient-netstandard2.0.yaml b/bin/configs/csharp-httpclient-netstandard2.0.yaml index e431b385e39..326f8df942b 100644 --- a/bin/configs/csharp-httpclient-netstandard2.0.yaml +++ b/bin/configs/csharp-httpclient-netstandard2.0.yaml @@ -10,3 +10,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true targetFramework: netstandard2.0 + equatable: true diff --git a/bin/configs/csharp-restsharp-echo-api.yaml b/bin/configs/csharp-restsharp-echo-api.yaml index 3380ae3c3d2..4d93a0d3562 100644 --- a/bin/configs/csharp-restsharp-echo-api.yaml +++ b/bin/configs/csharp-restsharp-echo-api.yaml @@ -7,3 +7,4 @@ additionalProperties: targetFramework: net6.0 setCompareNetObjects: "true" hideGenerationTimestamp: "true" + equatable: true diff --git a/bin/configs/csharp-restsharp-net4.7-multipleFrameworks.yaml b/bin/configs/csharp-restsharp-net4.7-multipleFrameworks.yaml index 5176032c265..9a44c923616 100644 --- a/bin/configs/csharp-restsharp-net4.7-multipleFrameworks.yaml +++ b/bin/configs/csharp-restsharp-net4.7-multipleFrameworks.yaml @@ -6,3 +6,4 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' targetFramework: netstandard2.1;net47 useCompareNetObjects: "true" + equatable: true diff --git a/bin/configs/csharp-restsharp-net4.7.yaml b/bin/configs/csharp-restsharp-net4.7.yaml index 91985cd8faa..7222a6bbcee 100644 --- a/bin/configs/csharp-restsharp-net4.7.yaml +++ b/bin/configs/csharp-restsharp-net4.7.yaml @@ -10,3 +10,4 @@ additionalProperties: useOneOfDiscriminatorLookup: true targetFramework: net47 skipOneOfAnyOfGetter: true + equatable: true diff --git a/bin/configs/csharp-restsharp-net4.8.yaml b/bin/configs/csharp-restsharp-net4.8.yaml index 29c4ac2b8f8..25b55bc3b82 100644 --- a/bin/configs/csharp-restsharp-net4.8.yaml +++ b/bin/configs/csharp-restsharp-net4.8.yaml @@ -9,3 +9,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true targetFramework: net48 + equatable: true diff --git a/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml b/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml index 56af6a800cb..e58d9e57686 100644 --- a/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml +++ b/bin/configs/csharp-restsharp-net6.0-name-mappings.yaml @@ -16,3 +16,4 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' hideGenerationTimestamp: "true" targetFramework: net6.0 + equatable: true diff --git a/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml b/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml index 597c7c328c7..7015e00a277 100644 --- a/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml +++ b/bin/configs/csharp-restsharp-net7.0-compareNetObjects.yaml @@ -6,3 +6,4 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' targetFramework: net7.0 useCompareNetObjects: "true" + equatable: true diff --git a/bin/configs/csharp-restsharp-net7.0.yaml b/bin/configs/csharp-restsharp-net7.0.yaml index 347ac99a2b3..402113ed6e2 100644 --- a/bin/configs/csharp-restsharp-net7.0.yaml +++ b/bin/configs/csharp-restsharp-net7.0.yaml @@ -9,3 +9,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true targetFramework: net7.0 + equatable: true diff --git a/bin/configs/csharp-restsharp-netstandard2.0-complexfiles.yaml b/bin/configs/csharp-restsharp-netstandard2.0-complexfiles.yaml index efd6022c6e8..a6782e9387b 100644 --- a/bin/configs/csharp-restsharp-netstandard2.0-complexfiles.yaml +++ b/bin/configs/csharp-restsharp-netstandard2.0-complexfiles.yaml @@ -6,5 +6,6 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' targetFramework: netstandard2.0 useCompareNetObjects: "true" + equatable: true globalProperties: skipFormModel: "false" diff --git a/bin/configs/csharp-restsharp-netstandard2.0-conditionalSerialization.yaml b/bin/configs/csharp-restsharp-netstandard2.0-conditionalSerialization.yaml index b92f3bac224..100203b43a6 100644 --- a/bin/configs/csharp-restsharp-netstandard2.0-conditionalSerialization.yaml +++ b/bin/configs/csharp-restsharp-netstandard2.0-conditionalSerialization.yaml @@ -10,3 +10,4 @@ additionalProperties: useOneOfDiscriminatorLookup: true targetFramework: netstandard2.0 conditionalSerialization: true + equatable: true diff --git a/bin/configs/csharp-restsharp-netstandard2.0.yaml b/bin/configs/csharp-restsharp-netstandard2.0.yaml index 994fd0d4064..d4b6d328983 100644 --- a/bin/configs/csharp-restsharp-netstandard2.0.yaml +++ b/bin/configs/csharp-restsharp-netstandard2.0.yaml @@ -9,3 +9,4 @@ additionalProperties: disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true targetFramework: netstandard2.0 + equatable: true diff --git a/bin/configs/csharp-unityWebRequest-netstandard2.0.yaml b/bin/configs/csharp-unityWebRequest-netstandard2.0.yaml index 8005d2ce78a..0f91232f8e1 100644 --- a/bin/configs/csharp-unityWebRequest-netstandard2.0.yaml +++ b/bin/configs/csharp-unityWebRequest-netstandard2.0.yaml @@ -6,3 +6,4 @@ templateDir: modules/openapi-generator/src/main/resources/csharp library: unityWebRequest additionalProperties: targetFramework: netstandard2.0 + equatable: true diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 09d2bc30c48..ffcc468cf61 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -25,7 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |dateFormat|The default Date format (only `generichost` library supports this option).| |yyyy'-'MM'-'dd| |dateTimeFormat|The default DateTime format (only `generichost` library supports this option).| |yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|