mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-05 15:10:49 +00:00
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
This commit is contained in:
parent
cf8ea9120a
commit
dd26e406b5
@ -2,7 +2,7 @@ package org.openapitools.codegen;
|
|||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
|
||||||
import java.util.LinkedHashSet;
|
import java.util.TreeSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -25,14 +25,14 @@ public class CodegenDiscriminator {
|
|||||||
private String propertyType;
|
private String propertyType;
|
||||||
private Map<String, String> mapping;
|
private Map<String, String> mapping;
|
||||||
|
|
||||||
// mappedModels is populated differently if discriminatorExplicitMappingVerbose is
|
// mappedModels is populated differently if legacyDiscriminatorBehavior is
|
||||||
// True or False. When:
|
// 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
|
// - the name to schema map info in the discriminator mapping entry in your openapi spec OR
|
||||||
// - child schemas that allOf inherit self schema
|
// - 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
|
// - 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
|
// - 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
|
// - descendant schemas that allOf inherit self schema AND
|
||||||
@ -40,7 +40,7 @@ public class CodegenDiscriminator {
|
|||||||
//
|
//
|
||||||
// see the method createDiscriminator in DefaultCodegen.java
|
// see the method createDiscriminator in DefaultCodegen.java
|
||||||
|
|
||||||
private Set<MappedModel> mappedModels = new LinkedHashSet<>();
|
private Set<MappedModel> mappedModels = new TreeSet<>();
|
||||||
|
|
||||||
public String getPropertyName() {
|
public String getPropertyName() {
|
||||||
return propertyName;
|
return propertyName;
|
||||||
|
@ -2936,7 +2936,16 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// for schemas that allOf inherit from this schema, add those descendants to this discriminator map
|
// for schemas that allOf inherit from this schema, add those descendants to this discriminator map
|
||||||
List<MappedModel> otherDescendants = getAllOfDescendants(schemaName, openAPI);
|
List<MappedModel> otherDescendants = getAllOfDescendants(schemaName, openAPI);
|
||||||
for (MappedModel otherDescendant : otherDescendants) {
|
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);
|
uniqueDescendants.add(otherDescendant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2954,6 +2963,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
Collections.sort(uniqueDescendants);
|
Collections.sort(uniqueDescendants);
|
||||||
}
|
}
|
||||||
discriminator.getMappedModels().addAll(uniqueDescendants);
|
discriminator.getMappedModels().addAll(uniqueDescendants);
|
||||||
|
|
||||||
return discriminator;
|
return discriminator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,11 +4,8 @@
|
|||||||
[DataContract(Name = "{{{name}}}")]
|
[DataContract(Name = "{{{name}}}")]
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
[JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")]
|
[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}}
|
{{#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}}
|
{{/mappedModels}}
|
||||||
{{/discriminator}}
|
{{/discriminator}}
|
||||||
{{>visibility}} partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}}
|
{{>visibility}} partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}}
|
||||||
|
@ -922,7 +922,7 @@ public class DefaultCodegenTest {
|
|||||||
public void testComposedSchemaAllOfDiscriminatorMapLegacy() {
|
public void testComposedSchemaAllOfDiscriminatorMapLegacy() {
|
||||||
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/allOf_composition_discriminator.yaml");
|
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/allOf_composition_discriminator.yaml");
|
||||||
DefaultCodegen codegen = new DefaultCodegen();
|
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);
|
codegen.setOpenAPI(openAPI);
|
||||||
Schema sc;
|
Schema sc;
|
||||||
String modelName;
|
String modelName;
|
||||||
|
@ -49,9 +49,9 @@ public abstract class JavaJaxrsBaseTest {
|
|||||||
|
|
||||||
String jsonTypeInfo = "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"className\", visible = true)";
|
String jsonTypeInfo = "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"className\", visible = true)";
|
||||||
String jsonSubType = "@JsonSubTypes({\n" +
|
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 = 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);
|
assertFileContains(Paths.get(outputPath + "/src/gen/java/org/openapitools/model/Animal.java"), jsonTypeInfo, jsonSubType);
|
||||||
}
|
}
|
||||||
@ -80,8 +80,8 @@ public abstract class JavaJaxrsBaseTest {
|
|||||||
|
|
||||||
String jsonTypeInfo = "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"className\", visible = true)";
|
String jsonTypeInfo = "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = \"className\", visible = true)";
|
||||||
String jsonSubType = "@JsonSubTypes({\n" +
|
String jsonSubType = "@JsonSubTypes({\n" +
|
||||||
" @JsonSubTypes.Type(value = Dog.class, name = \"Dog\"),\n" +
|
|
||||||
" @JsonSubTypes.Type(value = Cat.class, name = \"Cat\"),\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);
|
assertFileNotContains(Paths.get(outputPath + "/src/gen/java/org/openapitools/model/Animal.java"), jsonTypeInfo, jsonSubType);
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@ public class RubyClientCodegenTest {
|
|||||||
public void allOfTestLegacy() {
|
public void allOfTestLegacy() {
|
||||||
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/allOf.yaml");
|
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/allOf.yaml");
|
||||||
final RubyClientCodegen codegen = new RubyClientCodegen();
|
final RubyClientCodegen codegen = new RubyClientCodegen();
|
||||||
// codegen.discriminatorExplicitMappingVerbose == false by default
|
// codegen.setLegacyDiscriminatorBehavior(false) by default
|
||||||
codegen.setModuleName("OnlinePetstore");
|
codegen.setModuleName("OnlinePetstore");
|
||||||
|
|
||||||
final Schema schema = openAPI.getComponents().getSchemas().get("Person");
|
final Schema schema = openAPI.getComponents().getSchemas().get("Person");
|
||||||
|
@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract(Name = "Animal")]
|
[DataContract(Name = "Animal")]
|
||||||
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||||
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
||||||
|
@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract(Name = "GrandparentAnimal")]
|
[DataContract(Name = "GrandparentAnimal")]
|
||||||
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")]
|
[JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")]
|
||||||
public partial class GrandparentAnimal : IEquatable<GrandparentAnimal>, IValidatableObject
|
public partial class GrandparentAnimal : IEquatable<GrandparentAnimal>, IValidatableObject
|
||||||
|
@ -33,7 +33,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
[DataContract(Name = "ParentPet")]
|
[DataContract(Name = "ParentPet")]
|
||||||
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
|
||||||
public partial class ParentPet : GrandparentAnimal, IEquatable<ParentPet>, IValidatableObject
|
public partial class ParentPet : GrandparentAnimal, IEquatable<ParentPet>, IValidatableObject
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract(Name = "Animal")]
|
[DataContract(Name = "Animal")]
|
||||||
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||||
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
||||||
|
@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract(Name = "GrandparentAnimal")]
|
[DataContract(Name = "GrandparentAnimal")]
|
||||||
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")]
|
[JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")]
|
||||||
public partial class GrandparentAnimal : IEquatable<GrandparentAnimal>, IValidatableObject
|
public partial class GrandparentAnimal : IEquatable<GrandparentAnimal>, IValidatableObject
|
||||||
|
@ -33,7 +33,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
[DataContract(Name = "ParentPet")]
|
[DataContract(Name = "ParentPet")]
|
||||||
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
|
||||||
public partial class ParentPet : GrandparentAnimal, IEquatable<ParentPet>, IValidatableObject
|
public partial class ParentPet : GrandparentAnimal, IEquatable<ParentPet>, IValidatableObject
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract(Name = "Animal")]
|
[DataContract(Name = "Animal")]
|
||||||
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
[JsonConverter(typeof(JsonSubtypes), "ClassName")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
[JsonSubtypes.KnownSubType(typeof(Cat), "Cat")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
[JsonSubtypes.KnownSubType(typeof(Dog), "Dog")]
|
||||||
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
public partial class Animal : IEquatable<Animal>, IValidatableObject
|
||||||
|
@ -32,8 +32,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract(Name = "GrandparentAnimal")]
|
[DataContract(Name = "GrandparentAnimal")]
|
||||||
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")]
|
[JsonSubtypes.KnownSubType(typeof(ParentPet), "ParentPet")]
|
||||||
public partial class GrandparentAnimal : IEquatable<GrandparentAnimal>, IValidatableObject
|
public partial class GrandparentAnimal : IEquatable<GrandparentAnimal>, IValidatableObject
|
||||||
|
@ -33,7 +33,6 @@ namespace Org.OpenAPITools.Model
|
|||||||
[DataContract(Name = "ParentPet")]
|
[DataContract(Name = "ParentPet")]
|
||||||
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
[JsonConverter(typeof(JsonSubtypes), "PetType")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
||||||
[JsonSubtypes.KnownSubType(typeof(ChildCat), "ChildCat")]
|
|
||||||
public partial class ParentPet : GrandparentAnimal, IEquatable<ParentPet>, IValidatableObject
|
public partial class ParentPet : GrandparentAnimal, IEquatable<ParentPet>, IValidatableObject
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
import { exists, mapValues } from '../runtime';
|
import { exists, mapValues } from '../runtime';
|
||||||
import {
|
import {
|
||||||
DogFromJSONTyped,
|
CatFromJSONTyped,
|
||||||
CatFromJSONTyped
|
DogFromJSONTyped
|
||||||
} from './';
|
} from './';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -47,12 +47,12 @@ export function AnimalFromJSONTyped(json: any, ignoreDiscriminator: boolean): An
|
|||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
if (!ignoreDiscriminator) {
|
if (!ignoreDiscriminator) {
|
||||||
if (json['className'] === 'Dog') {
|
|
||||||
return DogFromJSONTyped(json, true);
|
|
||||||
}
|
|
||||||
if (json['className'] === 'Cat') {
|
if (json['className'] === 'Cat') {
|
||||||
return CatFromJSONTyped(json, true);
|
return CatFromJSONTyped(json, true);
|
||||||
}
|
}
|
||||||
|
if (json['className'] === 'Dog') {
|
||||||
|
return DogFromJSONTyped(json, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
|
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -34,9 +34,9 @@ import javax.validation.Valid;
|
|||||||
})
|
})
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal implements Serializable {
|
public class Animal implements Serializable {
|
||||||
|
@ -33,8 +33,8 @@ import javax.validation.Valid;
|
|||||||
})
|
})
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||||||
|
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||||||
|
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@ import javax.validation.Valid;
|
|||||||
})
|
})
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -33,9 +33,9 @@ import javax.validation.Valid;
|
|||||||
})
|
})
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -33,9 +33,9 @@ import javax.validation.Valid;
|
|||||||
})
|
})
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -33,9 +33,9 @@ import javax.validation.Valid;
|
|||||||
})
|
})
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen")@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -16,9 +16,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,8 +17,8 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = 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.JsonFilter(value = "filter-name")
|
||||||
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id")
|
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id")
|
||||||
|
@ -16,9 +16,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,8 +17,8 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,8 +17,8 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,8 +17,8 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,8 +17,8 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
@ -17,9 +17,9 @@ import javax.validation.constraints.*;
|
|||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@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 = BigCat.class, name = "BigCat"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
})
|
})
|
||||||
|
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user