Package org.openapitools.codegen
Class CodegenDiscriminator
- java.lang.Object
-
- org.openapitools.codegen.CodegenDiscriminator
-
public class CodegenDiscriminator extends Object
This class encapsulates the OpenAPI discriminator construct, as specified at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#discriminatorObject. When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CodegenDiscriminator.MappedModel
An object to hold discriminator mappings between payload values and schema names or references.
-
Constructor Summary
Constructors Constructor Description CodegenDiscriminator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
boolean
getIsEnum()
Set<CodegenDiscriminator.MappedModel>
getMappedModels()
Map<String,String>
getMapping()
String
getPropertyBaseName()
String
getPropertyGetter()
String
getPropertyName()
String
getPropertyType()
Map<String,Object>
getVendorExtensions()
int
hashCode()
void
setIsEnum(boolean isEnum)
void
setMappedModels(Set<CodegenDiscriminator.MappedModel> mappedModels)
void
setMapping(Map<String,String> mapping)
void
setPropertyBaseName(String propertyBaseName)
void
setPropertyGetter(String propertyGetter)
void
setPropertyName(String propertyName)
void
setPropertyType(String propertyType)
void
setVendorExtensions(Map<String,Object> vendorExtensions)
String
toString()
-
-
-
Method Detail
-
getPropertyName
public String getPropertyName()
-
setPropertyName
public void setPropertyName(String propertyName)
-
getPropertyGetter
public String getPropertyGetter()
-
setPropertyGetter
public void setPropertyGetter(String propertyGetter)
-
getPropertyBaseName
public String getPropertyBaseName()
-
setPropertyBaseName
public void setPropertyBaseName(String propertyBaseName)
-
getPropertyType
public String getPropertyType()
-
setPropertyType
public void setPropertyType(String propertyType)
-
getMappedModels
public Set<CodegenDiscriminator.MappedModel> getMappedModels()
-
setMappedModels
public void setMappedModels(Set<CodegenDiscriminator.MappedModel> mappedModels)
-
getIsEnum
public boolean getIsEnum()
-
setIsEnum
public void setIsEnum(boolean isEnum)
-
-