From dd26e406b58d19351dad6db6b6a8132663881e9e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 20 Nov 2020 11:57:48 +0800 Subject: [PATCH] Fix duplicated mappedModels (#7924) * fix duplicated mapped models * replace discriminatorExplicitMappingVerbose with legacyDiscriminatorBehavior in comments * use mappingName for comparison * improve template * fix tests * update comments * update ts samples --- .../openapitools/codegen/CodegenDiscriminator.java | 10 +++++----- .../org/openapitools/codegen/DefaultCodegen.java | 12 +++++++++++- .../resources/csharp-netcore/modelGeneric.mustache | 5 +---- .../org/openapitools/codegen/DefaultCodegenTest.java | 2 +- .../codegen/java/jaxrs/JavaJaxrsBaseTest.java | 6 +++--- .../codegen/ruby/RubyClientCodegenTest.java | 2 +- .../src/Org.OpenAPITools/Model/Animal.cs | 2 -- .../src/Org.OpenAPITools/Model/GrandparentAnimal.cs | 2 -- .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 - .../src/Org.OpenAPITools/Model/Animal.cs | 2 -- .../src/Org.OpenAPITools/Model/GrandparentAnimal.cs | 2 -- .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 - .../src/Org.OpenAPITools/Model/Animal.cs | 2 -- .../src/Org.OpenAPITools/Model/GrandparentAnimal.cs | 2 -- .../src/Org.OpenAPITools/Model/ParentPet.cs | 1 - .../builds/default-v3.0/models/Animal.ts | 10 +++++----- .../src/gen/java/org/openapitools/model/Animal.java | 4 ++-- .../src/gen/java/org/openapitools/model/Animal.java | 4 ++-- .../src/gen/java/org/openapitools/model/Animal.java | 2 +- .../src/gen/java/org/openapitools/model/Animal.java | 4 ++-- .../src/gen/java/org/openapitools/model/Animal.java | 4 ++-- .../src/gen/java/org/openapitools/model/Animal.java | 4 ++-- .../src/gen/java/org/openapitools/model/Animal.java | 4 ++-- .../src/gen/java/org/openapitools/model/Animal.java | 4 ++-- .../src/gen/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 2 +- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 2 +- .../src/main/java/org/openapitools/model/Animal.java | 2 +- .../src/main/java/org/openapitools/model/Animal.java | 2 +- .../src/main/java/org/openapitools/model/Animal.java | 2 +- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- .../org/openapitools/virtualan/model/Animal.java | 4 ++-- .../src/main/java/org/openapitools/model/Animal.java | 4 ++-- 43 files changed, 75 insertions(+), 83 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java index 4e30df0c9ea4..2a89f4ac0c12 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenDiscriminator.java @@ -2,7 +2,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; -import java.util.LinkedHashSet; +import java.util.TreeSet; import java.util.Map; import java.util.Objects; import java.util.Set; @@ -25,14 +25,14 @@ public class CodegenDiscriminator { private String propertyType; private Map mapping; - // mappedModels is populated differently if discriminatorExplicitMappingVerbose is + // mappedModels is populated differently if legacyDiscriminatorBehavior is // True or False. When: // - // discriminatorExplicitMappingVerbose == False, this contains: + // legacyDiscriminatorBehavior == False, this contains: // - the name to schema map info in the discriminator mapping entry in your openapi spec OR // - child schemas that allOf inherit self schema // - // discriminatorExplicitMappingVerbose == True, this contains: + // legacyDiscriminatorBehavior == True, this contains: // - the name to schema map info in the discriminMappedModelator mapping entry in your openapi spec AND // - x-discriminator-value mappings in child oneOf + anyOf schemas + descendant schemas that allOf inherit self schema AND // - descendant schemas that allOf inherit self schema AND @@ -40,7 +40,7 @@ public class CodegenDiscriminator { // // see the method createDiscriminator in DefaultCodegen.java - private Set mappedModels = new LinkedHashSet<>(); + private Set mappedModels = new TreeSet<>(); public String getPropertyName() { return propertyName; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index a13db5121fb6..a0508851d1f9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -2936,7 +2936,16 @@ protected CodegenDiscriminator createDiscriminator(String schemaName, Schema sch // for schemas that allOf inherit from this schema, add those descendants to this discriminator map List otherDescendants = getAllOfDescendants(schemaName, openAPI); for (MappedModel otherDescendant : otherDescendants) { - if (!uniqueDescendants.contains(otherDescendant)) { + // add only if the mapping names are not the same + boolean matched = false; + for (MappedModel uniqueDescendant: uniqueDescendants) { + if (uniqueDescendant.getMappingName().equals(otherDescendant.getMappingName())) { + matched = true; + break; + } + } + + if (matched == false) { uniqueDescendants.add(otherDescendant); } } @@ -2954,6 +2963,7 @@ protected CodegenDiscriminator createDiscriminator(String schemaName, Schema sch Collections.sort(uniqueDescendants); } discriminator.getMappedModels().addAll(uniqueDescendants); + return discriminator; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache index 2655f316558f..b256e9ec73c8 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelGeneric.mustache @@ -4,11 +4,8 @@ [DataContract(Name = "{{{name}}}")] {{#discriminator}} [JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")] - {{#children}} - [JsonSubtypes.KnownSubType(typeof({{classname}}), "{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}")] - {{/children}} {{#mappedModels}} - [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{{mappingName}}}")] + [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] {{/mappedModels}} {{/discriminator}} {{>visibility}} partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index a5986353f46f..b68af31f55bf 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -922,7 +922,7 @@ public void testComposedSchemaAllOfDiscriminatorMap() { public void testComposedSchemaAllOfDiscriminatorMapLegacy() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/allOf_composition_discriminator.yaml"); DefaultCodegen codegen = new DefaultCodegen(); - // codegen.discriminatorExplicitMappingVerbose remains false in the legacy use case + // codegen.legacyDiscriminatorBehavior remains false in the legacy use case codegen.setOpenAPI(openAPI); Schema sc; String modelName; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java index c4a0a84f4b12..4c83727afbe5 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java @@ -49,9 +49,9 @@ public void generateJsonAnnotationForPolymorphism() throws IOException { String jsonTypeInfo = "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"className\", visible = true)"; String jsonSubType = "@JsonSubTypes({\n" + - " @JsonSubTypes.Type(value = Dog.class, name = \"Dog\"),\n" + - " @JsonSubTypes.Type(value = Cat.class, name = \"Cat\"),\n" + " @JsonSubTypes.Type(value = BigDog.class, name = \"BigDog\"),\n" + + " @JsonSubTypes.Type(value = Cat.class, name = \"Cat\"),\n" + + " @JsonSubTypes.Type(value = Dog.class, name = \"Dog\"),\n" + "})"; assertFileContains(Paths.get(outputPath + "/src/gen/java/org/openapitools/model/Animal.java"), jsonTypeInfo, jsonSubType); } @@ -80,8 +80,8 @@ public void doNotGenerateJsonAnnotationForPolymorphismIfJsonExclude() throws IOE String jsonTypeInfo = "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"className\", visible = true)"; String jsonSubType = "@JsonSubTypes({\n" + - " @JsonSubTypes.Type(value = Dog.class, name = \"Dog\"),\n" + " @JsonSubTypes.Type(value = Cat.class, name = \"Cat\"),\n" + + " @JsonSubTypes.Type(value = Dog.class, name = \"Dog\"),\n" + "})"; assertFileNotContains(Paths.get(outputPath + "/src/gen/java/org/openapitools/model/Animal.java"), jsonTypeInfo, jsonSubType); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java index cdde6ddc8f37..61fbc93329cc 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ruby/RubyClientCodegenTest.java @@ -384,7 +384,7 @@ public void allOfTest() { public void allOfTestLegacy() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/allOf.yaml"); final RubyClientCodegen codegen = new RubyClientCodegen(); - // codegen.discriminatorExplicitMappingVerbose == false by default + // codegen.setLegacyDiscriminatorBehavior(false) by default codegen.setModuleName("OnlinePetstore"); final Schema schema = openAPI.getComponents().getSchemas().get("Person"); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Animal.cs index 4620be4ab086..4c509d2e4aa0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/Animal.cs @@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model /// [DataContract(Name = "Animal")] [JsonConverter(typeof(JsonSubtypes), "ClassName")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] public partial class Animal : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 864a2ab82260..473abe1c22cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model /// [DataContract(Name = "GrandparentAnimal")] [JsonConverter(typeof(JsonSubtypes), "PetType")] - [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] public partial class GrandparentAnimal : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ParentPet.cs index 7568579690f5..5bc6e4a668cf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/ParentPet.cs @@ -33,7 +33,6 @@ namespace Org.OpenAPITools.Model [DataContract(Name = "ParentPet")] [JsonConverter(typeof(JsonSubtypes), "PetType")] [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] public partial class ParentPet : GrandparentAnimal, IEquatable, IValidatableObject { /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs index 4620be4ab086..4c509d2e4aa0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs @@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model /// [DataContract(Name = "Animal")] [JsonConverter(typeof(JsonSubtypes), "ClassName")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] public partial class Animal : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 864a2ab82260..473abe1c22cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model /// [DataContract(Name = "GrandparentAnimal")] [JsonConverter(typeof(JsonSubtypes), "PetType")] - [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] public partial class GrandparentAnimal : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ParentPet.cs index 7568579690f5..5bc6e4a668cf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/ParentPet.cs @@ -33,7 +33,6 @@ namespace Org.OpenAPITools.Model [DataContract(Name = "ParentPet")] [JsonConverter(typeof(JsonSubtypes), "PetType")] [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] public partial class ParentPet : GrandparentAnimal, IEquatable, IValidatableObject { /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs index 681bdf6c79a2..8a5ff50efa8f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/Animal.cs @@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model /// [DataContract(Name = "Animal")] [JsonConverter(typeof(JsonSubtypes), "ClassName")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] public partial class Animal : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 7617373ec079..5122e62ddd8c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model /// [DataContract(Name = "GrandparentAnimal")] [JsonConverter(typeof(JsonSubtypes), "PetType")] - [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] [JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")] public partial class GrandparentAnimal : IEquatable, IValidatableObject diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ParentPet.cs index 31f6d30c47c4..9b854fbb1354 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -33,7 +33,6 @@ namespace Org.OpenAPITools.Model [DataContract(Name = "ParentPet")] [JsonConverter(typeof(JsonSubtypes), "PetType")] [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] - [JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")] public partial class ParentPet : GrandparentAnimal, IEquatable, IValidatableObject { /// diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts index dd621a2626cf..ae4d54ec09d8 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/Animal.ts @@ -14,8 +14,8 @@ import { exists, mapValues } from '../runtime'; import { - DogFromJSONTyped, - CatFromJSONTyped + CatFromJSONTyped, + DogFromJSONTyped } from './'; /** @@ -47,12 +47,12 @@ export function AnimalFromJSONTyped(json: any, ignoreDiscriminator: boolean): An return json; } if (!ignoreDiscriminator) { - if (json['className'] === 'Dog') { - return DogFromJSONTyped(json, true); - } if (json['className'] === 'Cat') { return CatFromJSONTyped(json, true); } + if (json['className'] === 'Dog') { + return DogFromJSONTyped(json, true); + } } return { diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Animal.java index c189f2c05909..21da0be4b15a 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java index 24954ccfbda0..f504ba2e89bd 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/Animal.java @@ -34,9 +34,9 @@ }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal implements Serializable { diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Animal.java index b4f9f2add872..8b8033f340ae 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Animal.java @@ -33,8 +33,8 @@ }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java index 3b0eff6127c6..1f0f1e316477 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/Animal.java @@ -16,9 +16,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java index 3b0eff6127c6..1f0f1e316477 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/Animal.java @@ -16,9 +16,9 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/Animal.java index ee28da656470..db142b932d90 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/Animal.java @@ -33,9 +33,9 @@ }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/Animal.java index ee28da656470..db142b932d90 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/Animal.java @@ -33,9 +33,9 @@ }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Animal.java index ee28da656470..db142b932d90 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/Animal.java @@ -33,9 +33,9 @@ }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Animal.java index ee28da656470..db142b932d90 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/Animal.java @@ -33,9 +33,9 @@ }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java index 5db142ed4e8e..1319038cccc0 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java index 5db142ed4e8e..1319038cccc0 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java index 44736334d006..6c1b4f75d082 100644 --- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -16,9 +16,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java index 0228a2cab2ed..7fb6b8e2ef66 100644 --- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -17,8 +17,8 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java index 7258e11c54e6..21643177b365 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) @com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name") @com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id") diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java index 44736334d006..6c1b4f75d082 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Animal.java @@ -16,9 +16,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java index 5db142ed4e8e..1319038cccc0 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java index 5db142ed4e8e..1319038cccc0 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java index 5db142ed4e8e..1319038cccc0 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java index 5db142ed4e8e..1319038cccc0 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java index 5db142ed4e8e..1319038cccc0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java index 0228a2cab2ed..7fb6b8e2ef66 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -17,8 +17,8 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java index 0228a2cab2ed..7fb6b8e2ef66 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/Animal.java @@ -17,8 +17,8 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java index 0228a2cab2ed..7fb6b8e2ef66 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/Animal.java @@ -17,8 +17,8 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java index 0228a2cab2ed..7fb6b8e2ef66 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/Animal.java @@ -17,8 +17,8 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java index 5db142ed4e8e..1319038cccc0 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java index 2de1e672eb1d..8bd774613ef7 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java index 5db142ed4e8e..1319038cccc0 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Animal.java @@ -17,9 +17,9 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), + @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) public class Animal {