Package org.openapitools.codegen
Class CodegenDiscriminator.MappedModel
- java.lang.Object
-
- org.openapitools.codegen.CodegenDiscriminator.MappedModel
-
- All Implemented Interfaces:
Comparable<CodegenDiscriminator.MappedModel>
- Enclosing class:
- CodegenDiscriminator
public static class CodegenDiscriminator.MappedModel extends Object implements Comparable<CodegenDiscriminator.MappedModel>
An object to hold discriminator mappings between payload values and schema names or references. In the OpenAPI document, the discriminator "mapping" attribute is optional. In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional mapping definition MAY be used. In OpenAPITools codegen, the MappedModel is the union of all the discriminator mappings, both explicitly defined in the OpenAPI document and inherited from oneOf/allOf/anyOf.
-
-
Constructor Summary
Constructors Constructor Description MappedModel(String mappingName, String modelName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(CodegenDiscriminator.MappedModel other)
boolean
equals(Object o)
String
getMappingName()
CodegenModel
getModel()
String
getModelName()
int
hashCode()
void
setMappingName(String mappingName)
void
setModel(CodegenModel model)
void
setModelName(String modelName)
-
-
-
Method Detail
-
compareTo
public int compareTo(CodegenDiscriminator.MappedModel other)
- Specified by:
compareTo
in interfaceComparable<CodegenDiscriminator.MappedModel>
-
getMappingName
public String getMappingName()
-
setMappingName
public void setMappingName(String mappingName)
-
getModelName
public String getModelName()
-
setModelName
public void setModelName(String modelName)
-
getModel
public CodegenModel getModel()
-
setModel
public void setModel(CodegenModel model)
-
-