From 63897c4919f01efd4abd8b5bc6d46bdcc7186104 Mon Sep 17 00:00:00 2001 From: Prajon Shakya Date: Mon, 22 Aug 2022 16:50:18 -0400 Subject: [PATCH 1/2] Updated modelOneOf to fix oneOf array of string without need to specify format in openapi spec --- .../src/main/resources/csharp-netcore/modelOneOf.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache index a7756c16045c..6f5257f71602 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelOneOf.mustache @@ -73,7 +73,7 @@ /// the InvalidClassException will be thrown /// /// An instance of {{dataType}} - public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{#isArray}}{{#lambda.titlecase}}{{{dataFormat}}}{{/lambda.titlecase}}{{/isArray}}() + public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}}() { return ({{{dataType}}})this.ActualInstance; } From 46707c98798acddf35e2a3618970f2fdf1e68328 Mon Sep 17 00:00:00 2001 From: Prajon Shakya Date: Tue, 23 Aug 2022 10:41:49 -0400 Subject: [PATCH 2/2] Ran generate samples for csharp-netcore --- .../src/Org.OpenAPITools/Model/PolymorphicProperty.cs | 2 +- .../src/Org.OpenAPITools/Model/PolymorphicProperty.cs | 2 +- .../src/Org.OpenAPITools/Model/PolymorphicProperty.cs | 2 +- .../src/Org.OpenAPITools/Model/PolymorphicProperty.cs | 2 +- .../src/Org.OpenAPITools/Model/PolymorphicProperty.cs | 2 +- .../src/Org.OpenAPITools/Model/PolymorphicProperty.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 0ce4e18eb2ea..9cbd33ed87b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -154,7 +154,7 @@ public Object GetObject() /// the InvalidClassException will be thrown /// /// An instance of List<string> - public List GetListString() + public List GetListstring() { return (List)this.ActualInstance; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 4e8c938e2e97..9df24a07ead8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -155,7 +155,7 @@ public Object GetObject() /// the InvalidClassException will be thrown /// /// An instance of List<string> - public List GetListString() + public List GetListstring() { return (List)this.ActualInstance; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 0ce4e18eb2ea..9cbd33ed87b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -154,7 +154,7 @@ public Object GetObject() /// the InvalidClassException will be thrown /// /// An instance of List<string> - public List GetListString() + public List GetListstring() { return (List)this.ActualInstance; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 0ce4e18eb2ea..9cbd33ed87b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -154,7 +154,7 @@ public Object GetObject() /// the InvalidClassException will be thrown /// /// An instance of List<string> - public List GetListString() + public List GetListstring() { return (List)this.ActualInstance; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 0ce4e18eb2ea..9cbd33ed87b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -154,7 +154,7 @@ public Object GetObject() /// the InvalidClassException will be thrown /// /// An instance of List<string> - public List GetListString() + public List GetListstring() { return (List)this.ActualInstance; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 0ce4e18eb2ea..9cbd33ed87b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -154,7 +154,7 @@ public Object GetObject() /// the InvalidClassException will be thrown /// /// An instance of List<string> - public List GetListString() + public List GetListstring() { return (List)this.ActualInstance; }