Class AbstractJavaCodegen
- java.lang.Object
-
- org.openapitools.codegen.DefaultCodegen
-
- org.openapitools.codegen.languages.AbstractJavaCodegen
-
- All Implemented Interfaces:
CodegenConfig
,DocumentationProviderFeatures
- Direct Known Subclasses:
AbstractJavaJAXRSServerCodegen
,GroovyClientCodegen
,JavaClientCodegen
,JavaCXFClientCodegen
,JavaHelidonCommonCodegen
,JavaInflectorServerCodegen
,JavaMicronautAbstractCodegen
,JavaPKMSTServerCodegen
,JavaPlayFrameworkCodegen
,JavaUndertowServerCodegen
,JavaVertXServerCodegen
,JavaVertXWebServerCodegen
,SpringCodegen
public abstract class AbstractJavaCodegen extends DefaultCodegen implements CodegenConfig, DocumentationProviderFeatures
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openapitools.codegen.languages.features.DocumentationProviderFeatures
DocumentationProviderFeatures.AnnotationLibrary, DocumentationProviderFeatures.DocumentationProvider
-
-
Field Summary
-
Fields inherited from class org.openapitools.codegen.DefaultCodegen
additionalProperties, addOneOfInterfaceImports, addOneOfInterfaces, addSuffixToDuplicateOperationNicknames, allowUnicodeIdentifiers, apiDocTemplateFiles, apiNamePrefix, apiNameSuffix, apiPackage, apiTemplateFiles, apiTestTemplateFiles, autosetConstants, cliOptions, DefaultFeatureSet, defaultIncludes, disallowAdditionalPropertiesIfNotPresent, docExtension, embeddedTemplateDir, enableMinimalUpdate, enablePostProcessFile, ensureUniqueParams, enumNameMapping, enumUnknownDefaultCase, enumUnknownDefaultCaseName, falseSchema, filesMetadataFilename, fileSuffix, generatorMetadata, gitHost, gitRepoId, gitUserId, hideGenerationTimestamp, httpUserAgent, ignoreFilePathOverride, importBaseType, importContainerType, importMapping, inlineSchemaNameMapping, inlineSchemaOption, inputSpec, instantiationTypes, JSON_MIME_PATTERN, JSON_VENDOR_MIME_PATTERN, languageSpecificPrimitives, legacyDiscriminatorBehavior, library, loadDeepObjectIntoItems, modelDocTemplateFiles, modelNameMapping, modelNamePrefix, modelNameSuffix, modelPackage, modelTemplateFiles, modelTestTemplateFiles, nameMapping, openAPI, openapiGeneratorIgnoreList, openapiNormalizer, outputFolder, parameterNameMapping, prependFormOrBodyParameters, releaseNote, removeEnumValuePrefix, removeOperationIdPrefix, removeOperationIdPrefixCount, removeOperationIdPrefixDelimiter, reservedWords, reservedWordsMappings, schemaMapping, serverVariables, skipOperationExample, skipOverwrite, sortModelPropertiesByRequiredFlag, sortParamsByRequiredFlag, specialCharReplacements, strictSpecBehavior, supportedLibraries, supportingFiles, supportsAdditionalPropertiesWithComposedSchema, supportsInheritance, supportsMixins, supportsMultipleInheritance, templateDir, templateOutputDirs, testPackage, trueSchema, typeAliases, typeMapping, useOneOfInterfaces, vendorExtensions, versionMetadataFilename, XML_MIME_PATTERN
-
Fields inherited from interface org.openapitools.codegen.languages.features.DocumentationProviderFeatures
ANNOTATION_LIBRARY, DOCUMENTATION_PROVIDER
-
-
Constructor Summary
Constructors Constructor Description AbstractJavaCodegen()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, io.swagger.v3.oas.models.media.Schema schema)
Handle the model for the 'additionalProperties' keyword in the OAS schema.static void
addImports(List<Map<String,String>> imports, CodegenModel cm, Map<String,String> imports2Classnames)
void
addImportsToOneOfInterface(List<Map<String,String>> imports)
String
apiDocFileFolder()
String
apiFileFolder()
String
apiTestFileFolder()
protected void
applyJakartaPackage()
protected void
applyJavaxPackage()
String
escapeQuotationMark(String input)
Escape single and/or double quote to avoid code injectionString
escapeReservedWord(String name)
Return the escaped name of the reserved wordString
escapeUnsafeCharacters(String input)
override with any special text escaping logic to handle unsafe characters so as to avoid code injectionprotected Optional<CodegenProperty>
findByName(String name, List<CodegenProperty> properties)
Search for property byCodegenProperty.name
CodegenModel
fromModel(String name, io.swagger.v3.oas.models.media.Schema model)
Convert OAS Model object to Codegen Model object.CodegenOperation
fromOperation(String path, String httpMethod, io.swagger.v3.oas.models.Operation operation, List<io.swagger.v3.oas.models.servers.Server> servers)
Convert OAS Operation object to Codegen Operation objectList<String>
getAdditionalModelTypeAnnotations()
List<String>
getAdditionalOneOfTypeAnnotations()
String
getAlias(String name)
Determine the type alias for the given type if it exists.DocumentationProviderFeatures.AnnotationLibrary
getAnnotationLibrary()
String
getArtifactDescription()
String
getArtifactId()
String
getArtifactUrl()
String
getArtifactVersion()
String
getBooleanGetterPrefix()
String
getDateLibrary()
String
getDeveloperEmail()
String
getDeveloperName()
String
getDeveloperOrganization()
String
getDeveloperOrganizationUrl()
DocumentationProviderFeatures.DocumentationProvider
getDocumentationProvider()
String
getGroupId()
String
getInvokerPackage()
String
getLicenseName()
String
getLicenseUrl()
String
getOutputTestFolder()
String
getSchemaType(io.swagger.v3.oas.models.media.Schema p)
returns the OpenAPI type for the property.String
getScmConnection()
String
getScmDeveloperConnection()
String
getScmUrl()
Boolean
getSerializableModel()
String
getSourceFolder()
List<VendorExtension>
getSupportedVendorExtensions()
String
getterAndSetterCapitalize(String name)
Camelize the method name of the getter and setterString
getTestFolder()
String
getTypeDeclaration(io.swagger.v3.oas.models.media.Schema p)
Output the language-specific type declaration of the property.protected void
handleImplicitHeaders(CodegenOperation operation)
This method removes all implicit header parameters from the list of parametersboolean
isAddNullableImports(CodegenModel cm, boolean addImports, CodegenProperty var)
boolean
isOpenApiNullable()
String
modelDocFileFolder()
String
modelFileFolder()
String
modelTestFileFolder()
protected boolean
needToImport(String type)
Check the type to see if it needs import the library/module/packageMap<String,ModelsMap>
postProcessAllModels(Map<String,ModelsMap> objs)
void
postProcessFile(File file, String fileType)
Post-process the auto-generated file, e.g.void
postProcessModelProperty(CodegenModel model, CodegenProperty property)
ModelsMap
postProcessModels(ModelsMap objs)
OperationsMap
postProcessOperationsWithModels(OperationsMap objs, List<ModelMap> allModels)
void
postProcessResponseWithProperty(CodegenResponse response, CodegenProperty property)
void
preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
void
processOpts()
String
sanitizeTag(String tag)
Sanitize tagvoid
setAdditionalEnumTypeAnnotations(List<String> additionalEnumTypeAnnotations)
void
setAdditionalModelTypeAnnotations(List<String> additionalModelTypeAnnotations)
void
setAdditionalOneOfTypeAnnotations(List<String> additionalOneOfTypeAnnotations)
void
setAnnotationLibrary(DocumentationProviderFeatures.AnnotationLibrary annotationLibrary)
void
setArtifactDescription(String artifactDescription)
void
setArtifactId(String artifactId)
void
setArtifactUrl(String artifactUrl)
void
setArtifactVersion(String artifactVersion)
void
setBooleanGetterPrefix(String booleanGetterPrefix)
void
setCamelCaseDollarSign(boolean camelCaseDollarSign)
void
setContainerDefaultToNull(boolean containerDefaultToNull)
void
setDateLibrary(String library)
void
setDeveloperEmail(String developerEmail)
void
setDeveloperName(String developerName)
void
setDeveloperOrganization(String developerOrganization)
void
setDeveloperOrganizationUrl(String developerOrganizationUrl)
void
setDisableHtmlEscaping(boolean disabled)
void
setDiscriminatorCaseSensitive(boolean discriminatorCaseSensitive)
Set whether discriminator value lookup is case-sensitive or not.void
setDocumentationProvider(DocumentationProviderFeatures.DocumentationProvider documentationProvider)
void
setGroupId(String groupId)
void
setIgnoreAnyOfInEnum(boolean ignoreAnyOfInEnum)
void
setImplicitHeaders(boolean implicitHeaders)
void
setImplicitHeadersRegex(String implicitHeadersRegex)
void
setInvokerPackage(String invokerPackage)
void
setLicenseName(String licenseName)
void
setLicenseUrl(String licenseUrl)
void
setOpenApiNullable(boolean openApiNullable)
void
setOutputDir(String dir)
void
setOutputTestFolder(String outputTestFolder)
void
setParameterExampleValue(CodegenParameter p)
Return the example value of the parameter.void
setParameterExampleValue(CodegenParameter codegenParameter, io.swagger.v3.oas.models.parameters.Parameter parameter)
Return the example value of the parameter.void
setParameterExampleValue(CodegenParameter codegenParameter, io.swagger.v3.oas.models.parameters.RequestBody requestBody)
Return the example value of the parameter.void
setParentArtifactId(String parentArtifactId)
void
setParentGroupId(String parentGroupId)
void
setParentOverridden(boolean parentOverridden)
void
setParentVersion(String parentVersion)
void
setScmConnection(String scmConnection)
void
setScmDeveloperConnection(String scmDeveloperConnection)
void
setScmUrl(String scmUrl)
void
setSerializableModel(Boolean serializableModel)
void
setSerializeBigDecimalAsString(boolean s)
void
setSourceFolder(String sourceFolder)
void
setSupportAsync(boolean enabled)
void
setTestFolder(String testFolder)
void
setUseJakartaEe(boolean useJakartaEe)
void
setWithXml(boolean withXml)
String
toApiDocFilename(String name)
Return the file name of the Api DocumentationString
toApiFilename(String name)
Return the file name of the Api TestString
toApiTestFilename(String name)
Return the file name of the Api TestString
toArrayDefaultValue(CodegenProperty cp, io.swagger.v3.oas.models.media.Schema schema)
Return the default value of array propertyString
toBooleanGetter(String name)
Output the Getter name for boolean property, e.g.String
toDefaultParameterValue(io.swagger.v3.oas.models.media.Schema<?> schema)
Return the default value of the parameterString
toDefaultValue(CodegenProperty cp, io.swagger.v3.oas.models.media.Schema schema)
Return the default value of the propertyString
toEnumName(CodegenProperty property)
Return the Enum name (e.g.String
toEnumValue(String value, String datatype)
Return the enum value in the language specified format e.g.String
toEnumVarName(String value, String datatype)
Return the sanitized variable name for enumString
toExampleValue(io.swagger.v3.oas.models.media.Schema p)
Return the example value of the propertyString
toModelDocFilename(String name)
Return the capitalized file name of the model documentationString
toModelFilename(String name)
Return the capitalized file name of the modelString
toModelName(String name)
Converts the OpenAPI schema name to a model name suitable for the current code generator.String
toModelTestFilename(String name)
Return the capitalized file name of the model testString
toOperationId(String operationId)
Return the operation ID (method name)String
toParamName(String name)
Return the parameter name by removing invalid characters and proper escaping if it's a reserved word.String
toRegularExpression(String pattern)
Return the regular expression/JSON schema pattern (http://json-schema.org/latest/json-schema-validation.html#anchor33)String
toVarName(String name)
Return the variable name by removing invalid characters and proper escaping if it's a reserved word.-
Methods inherited from class org.openapitools.codegen.DefaultCodegen
addBodyModelSchema, addHeaders, addImport, addImport, addImport, addImports, addImports, addImports, addImportsForPropertyType, additionalProperties, addMustacheLambdas, addOneOfInterfaceModel, addOneOfNameExtension, addOperationToGroup, addOption, addOption, addParentContainer, addParentFromContainer, addProperties, addRegularExpressionDelimiter, addRequiredVarsMap, addSwitch, addVars, addVars, addVarsRequiredVarsAdditionalProps, apiDocFilename, apiDocTemplateFiles, apiFilename, apiFilename, apiPackage, apiTemplateFiles, apiTestFilename, apiTestTemplateFiles, buildEnumVars, buildLibraryCliOption, cliOptions, convertPropertyToBoolean, convertPropertyToBooleanAndWriteBack, createDiscriminator, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, findCommonPrefixOfVars, findMethodResponse, fromCallback, fromFormProperty, fromParameter, fromProperty, fromProperty, fromProperty, fromRequestBody, fromRequestBodyToFormParameters, fromResponse, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generateJSONSpecFile, generateYAMLSpecFile, generatorLanguage, generatorLanguageVersion, getAdditionalPropertiesName, getAddSuffixToDuplicateOperationNicknames, getAllModels, getAllOfDescendants, getAllowUnicodeIdentifiers, getApiNamePrefix, getApiNameSuffix, getCollectionFormat, getCollectionFormat, getConsumesInfo, getContent, getContentType, getDisallowAdditionalPropertiesIfNotPresent, getDocExtension, getEnsureUniqueParams, getEnumDefaultValue, getEnumUnknownDefaultCase, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHelp, getHttpUserAgent, getIgnoreFilePathOverride, getInnerEnumAllowableValues, getInputSpec, getItemsName, getLegacyDiscriminatorBehavior, getLibrary, getModelNamePrefix, getModelNameSuffix, getModelNameToSchemaCache, getMostInnerItems, getName, getOneOfAnyOfDescendants, getOpenAPIGeneratorIgnoreList, getOrGenerateOperationId, getOutputDir, getParameterDataType, getPrependFormOrBodyParameters, getProducesInfo, getReleaseNote, getRemoveOperationIdPrefixCount, getRemoveOperationIdPrefixDelimiter, getSchemaAdditionalProperties, getSchemaFromBooleanOrSchema, getSchemaItems, getSingleSchemaType, getSortModelPropertiesByRequiredFlag, getSortParamsByRequiredFlag, getSymbolName, getTag, getTemplatingEngine, getTypeDeclaration, getUseInlineModelResolver, getUseOneOfInterfaces, getUseOpenAPINormalizer, getVersionMetadataFilename, handleConstantParams, handleMethodResponse, handleMethodResponse, handleSpecialCharacters, hasBodyParameter, hasFormParameter, importMapping, initializeSpecialCharacterMapping, inlineSchemaNameMapping, inlineSchemaOption, instantiationTypes, isAnyTypeSchema, isDataTypeBinary, isDataTypeFile, isDataTypeString, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isJsonMimeType, isJsonVendorMimeType, isLibrary, isParameterNameUnique, isPropertyInnerMostEnum, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isReservedWord, isSkipOperationExample, isSkipOverwrite, isStrictSpecBehavior, isXmlMimeType, languageSpecificPrimitives, lowerCamelCase, modelDocTemplateFiles, modelFilename, modelFilename, modelNameMapping, modelPackage, modelTemplateFiles, modelTestTemplateFiles, modifyFeatureSet, nameMapping, openapiGeneratorIgnoreList, openapiNormalizer, outputFolder, parameterNameMapping, postProcess, postProcessEnumVars, postProcessModelsEnum, postProcessParameter, postProcessSupportingFileData, postProcessWebhooksWithModels, processCompiler, processOpenAPI, processTemplatingEngine, processTestExampleData, removeImport, removeNonNameElementToCamelCase, removeNonNameElementToCamelCase, removeOption, removeSelfReferenceImports, reservedWords, reservedWordsMappings, sanitizeName, sanitizeName, sanitizeName, schemaMapping, serverVariableOverrides, setAddProps, setAllowUnicodeIdentifiers, setApiNamePrefix, setApiNameSuffix, setApiPackage, setAutosetConstants, setCircularReferences, setDisallowAdditionalPropertiesIfNotPresent, setDocExtension, setEnableMinimalUpdate, setEnablePostProcessFile, setEnsureUniqueParams, setEnumUnknownDefaultCase, setFilesMetadataFilename, setGitHost, setGitRepoId, setGitUserId, setHideGenerationTimestamp, setHttpUserAgent, setIgnoreFilePathOverride, setInputSpec, setLegacyDiscriminatorBehavior, setLibrary, setModelNamePrefix, setModelNameSuffix, setModelPackage, setNonArrayMapProperty, setOpenAPI, setParameterBooleanFlagWithCodegenProperty, setParameterEncodingValues, setParameterExamples, setParameterNullable, setPrependFormOrBodyParameters, setReleaseNote, setRemoveEnumValuePrefix, setRemoveOperationIdPrefix, setRemoveOperationIdPrefixCount, setRemoveOperationIdPrefixDelimiter, setReservedWordsLowerCase, setSkipOperationExample, setSkipOverwrite, setSortModelPropertiesByRequiredFlag, setSortParamsByRequiredFlag, setStrictSpecBehavior, setTemplateDir, setTemplatingEngine, setUseOneOfInterfaces, setVersionMetadataFilename, shouldAddImport, shouldOverwrite, specVersionGreaterThanOrEqualTo310, supportedLibraries, supportingFiles, templateDir, templateOutputDirs, testPackage, toAllOfName, toAnyOfName, toApiImport, toApiName, toApiVarName, toArrayModelParamName, toDefaultParameterValue, toDefaultValue, toDefaultValueWithParam, toEnumDefaultValue, toExamples, toGetter, toInstantiationType, toMediaTypeSchemaName, toModelImport, toModelImportMap, toOneOfName, toSetter, toTestCaseName, typeMapping, unaliasPropertySchema, unaliasSchema, updateAllModels, updateCodegenPropertyEnum, updateDataTypeWithEnumForArray, updateDataTypeWithEnumForMap, updateEnumVarsWithExtensions, updateModelForAnyType, updateModelForComposedSchema, updateModelForInteger, updateModelForNumber, updateModelForObject, updateModelForString, updateOption, updateParameterForString, updatePropertyForAnyType, updatePropertyForArray, updatePropertyForInteger, updatePropertyForMap, updatePropertyForMap, updatePropertyForNumber, updatePropertyForObject, updatePropertyForString, updateRequestBodyForArray, updateRequestBodyForMap, updateRequestBodyForObject, updateRequestBodyForPrimitiveType, updateRequestBodyForString, vendorExtensions, writePropertyBack
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openapitools.codegen.CodegenConfig
additionalProperties, addOperationToGroup, apiDocFilename, apiDocTemplateFiles, apiFilename, apiFilename, apiPackage, apiTemplateFiles, apiTestFilename, apiTestTemplateFiles, cliOptions, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generatorLanguage, generatorLanguageVersion, getAddSuffixToDuplicateOperationNicknames, getDocExtension, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHelp, getHttpUserAgent, getIgnoreFilePathOverride, getInputSpec, getLibrary, getName, getOpenAPIGeneratorIgnoreList, getOutputDir, getReleaseNote, getTag, getTemplatingEngine, getTypeDeclaration, getUseInlineModelResolver, getUseOpenAPINormalizer, getVersionMetadataFilename, importMapping, inlineSchemaNameMapping, inlineSchemaOption, instantiationTypes, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isSkipOperationExample, isSkipOverwrite, isStrictSpecBehavior, languageSpecificPrimitives, modelDocTemplateFiles, modelFilename, modelFilename, modelNameMapping, modelPackage, modelTemplateFiles, modelTestTemplateFiles, nameMapping, openapiGeneratorIgnoreList, openapiNormalizer, outputFolder, parameterNameMapping, postProcess, postProcessParameter, postProcessSupportingFileData, postProcessWebhooksWithModels, processCompiler, processOpenAPI, processTemplatingEngine, reservedWords, reservedWordsMappings, sanitizeName, schemaMapping, serverVariableOverrides, setDocExtension, setEnableMinimalUpdate, setEnablePostProcessFile, setGitHost, setGitRepoId, setGitUserId, setHideGenerationTimestamp, setHttpUserAgent, setIgnoreFilePathOverride, setInputSpec, setLibrary, setOpenAPI, setReleaseNote, setRemoveEnumValuePrefix, setRemoveOperationIdPrefix, setSkipOperationExample, setSkipOverwrite, setStrictSpecBehavior, setTemplatingEngine, shouldOverwrite, supportedLibraries, supportingFiles, templateDir, templateOutputDirs, testPackage, toApiImport, toApiName, toApiVarName, toGetter, toModelImport, toModelImportMap, toSetter, typeMapping, unaliasSchema, updateAllModels, vendorExtensions
-
Methods inherited from interface org.openapitools.codegen.languages.features.DocumentationProviderFeatures
defaultDocumentationProvider, supportedAnnotationLibraries, supportedDocumentationProvider
-
-
-
-
Field Detail
-
DEFAULT_LIBRARY
public static final String DEFAULT_LIBRARY
- See Also:
- Constant Field Values
-
DATE_LIBRARY
public static final String DATE_LIBRARY
- See Also:
- Constant Field Values
-
SUPPORT_ASYNC
public static final String SUPPORT_ASYNC
- See Also:
- Constant Field Values
-
WITH_XML
public static final String WITH_XML
- See Also:
- Constant Field Values
-
DISABLE_HTML_ESCAPING
public static final String DISABLE_HTML_ESCAPING
- See Also:
- Constant Field Values
-
BOOLEAN_GETTER_PREFIX
public static final String BOOLEAN_GETTER_PREFIX
- See Also:
- Constant Field Values
-
IGNORE_ANYOF_IN_ENUM
public static final String IGNORE_ANYOF_IN_ENUM
- See Also:
- Constant Field Values
-
ADDITIONAL_MODEL_TYPE_ANNOTATIONS
public static final String ADDITIONAL_MODEL_TYPE_ANNOTATIONS
- See Also:
- Constant Field Values
-
ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS
public static final String ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS
- See Also:
- Constant Field Values
-
ADDITIONAL_ENUM_TYPE_ANNOTATIONS
public static final String ADDITIONAL_ENUM_TYPE_ANNOTATIONS
- See Also:
- Constant Field Values
-
DISCRIMINATOR_CASE_SENSITIVE
public static final String DISCRIMINATOR_CASE_SENSITIVE
- See Also:
- Constant Field Values
-
OPENAPI_NULLABLE
public static final String OPENAPI_NULLABLE
- See Also:
- Constant Field Values
-
JACKSON
public static final String JACKSON
- See Also:
- Constant Field Values
-
TEST_OUTPUT
public static final String TEST_OUTPUT
- See Also:
- Constant Field Values
-
IMPLICIT_HEADERS
public static final String IMPLICIT_HEADERS
- See Also:
- Constant Field Values
-
IMPLICIT_HEADERS_REGEX
public static final String IMPLICIT_HEADERS_REGEX
- See Also:
- Constant Field Values
-
JAVAX_PACKAGE
public static final String JAVAX_PACKAGE
- See Also:
- Constant Field Values
-
USE_JAKARTA_EE
public static final String USE_JAKARTA_EE
- See Also:
- Constant Field Values
-
CONTAINER_DEFAULT_TO_NULL
public static final String CONTAINER_DEFAULT_TO_NULL
- See Also:
- Constant Field Values
-
CAMEL_CASE_DOLLAR_SIGN
public static final String CAMEL_CASE_DOLLAR_SIGN
- See Also:
- Constant Field Values
-
USE_ONE_OF_INTERFACES
public static final String USE_ONE_OF_INTERFACES
- See Also:
- Constant Field Values
-
DEFAULT_TEST_FOLDER
public static final String DEFAULT_TEST_FOLDER
- See Also:
- Constant Field Values
-
dateLibrary
protected String dateLibrary
-
supportAsync
protected boolean supportAsync
-
withXml
protected boolean withXml
-
invokerPackage
protected String invokerPackage
-
groupId
protected String groupId
-
artifactId
protected String artifactId
-
artifactVersion
protected String artifactVersion
-
artifactUrl
protected String artifactUrl
-
artifactDescription
protected String artifactDescription
-
developerName
protected String developerName
-
developerEmail
protected String developerEmail
-
developerOrganization
protected String developerOrganization
-
developerOrganizationUrl
protected String developerOrganizationUrl
-
scmConnection
protected String scmConnection
-
scmDeveloperConnection
protected String scmDeveloperConnection
-
scmUrl
protected String scmUrl
-
licenseName
protected String licenseName
-
licenseUrl
protected String licenseUrl
-
projectFolder
protected String projectFolder
-
projectTestFolder
protected String projectTestFolder
-
sourceFolder
protected String sourceFolder
-
testFolder
protected String testFolder
-
discriminatorCaseSensitive
protected boolean discriminatorCaseSensitive
-
serializableModel
protected Boolean serializableModel
-
serializeBigDecimalAsString
protected boolean serializeBigDecimalAsString
-
apiDocPath
protected String apiDocPath
-
modelDocPath
protected String modelDocPath
-
disableHtmlEscaping
protected boolean disableHtmlEscaping
-
booleanGetterPrefix
protected String booleanGetterPrefix
-
ignoreAnyOfInEnum
protected boolean ignoreAnyOfInEnum
-
parentGroupId
protected String parentGroupId
-
parentArtifactId
protected String parentArtifactId
-
parentVersion
protected String parentVersion
-
parentOverridden
protected boolean parentOverridden
-
openApiNullable
protected boolean openApiNullable
-
outputTestFolder
protected String outputTestFolder
-
documentationProvider
protected DocumentationProviderFeatures.DocumentationProvider documentationProvider
-
annotationLibrary
protected DocumentationProviderFeatures.AnnotationLibrary annotationLibrary
-
implicitHeaders
protected boolean implicitHeaders
-
implicitHeadersRegex
protected String implicitHeadersRegex
-
camelCaseDollarSign
protected boolean camelCaseDollarSign
-
useJakartaEe
protected boolean useJakartaEe
-
containerDefaultToNull
protected boolean containerDefaultToNull
-
-
Method Detail
-
processOpts
public void processOpts()
- Specified by:
processOpts
in interfaceCodegenConfig
- Overrides:
processOpts
in classDefaultCodegen
-
postProcessAllModels
public Map<String,ModelsMap> postProcessAllModels(Map<String,ModelsMap> objs)
- Specified by:
postProcessAllModels
in interfaceCodegenConfig
- Overrides:
postProcessAllModels
in classDefaultCodegen
-
applyJavaxPackage
protected void applyJavaxPackage()
-
applyJakartaPackage
protected void applyJakartaPackage()
-
escapeReservedWord
public String escapeReservedWord(String name)
Description copied from class:DefaultCodegen
Return the escaped name of the reserved word- Specified by:
escapeReservedWord
in interfaceCodegenConfig
- Overrides:
escapeReservedWord
in classDefaultCodegen
- Parameters:
name
- the name to be escaped- Returns:
- the escaped reserved word
throws Runtime exception as reserved word is not allowed (default behavior)
-
apiFileFolder
public String apiFileFolder()
- Specified by:
apiFileFolder
in interfaceCodegenConfig
- Overrides:
apiFileFolder
in classDefaultCodegen
-
apiTestFileFolder
public String apiTestFileFolder()
- Specified by:
apiTestFileFolder
in interfaceCodegenConfig
- Overrides:
apiTestFileFolder
in classDefaultCodegen
-
modelTestFileFolder
public String modelTestFileFolder()
- Specified by:
modelTestFileFolder
in interfaceCodegenConfig
- Overrides:
modelTestFileFolder
in classDefaultCodegen
-
modelFileFolder
public String modelFileFolder()
- Specified by:
modelFileFolder
in interfaceCodegenConfig
- Overrides:
modelFileFolder
in classDefaultCodegen
-
apiDocFileFolder
public String apiDocFileFolder()
- Specified by:
apiDocFileFolder
in interfaceCodegenConfig
- Overrides:
apiDocFileFolder
in classDefaultCodegen
-
modelDocFileFolder
public String modelDocFileFolder()
- Specified by:
modelDocFileFolder
in interfaceCodegenConfig
- Overrides:
modelDocFileFolder
in classDefaultCodegen
-
toApiDocFilename
public String toApiDocFilename(String name)
Description copied from class:DefaultCodegen
Return the file name of the Api Documentation- Specified by:
toApiDocFilename
in interfaceCodegenConfig
- Overrides:
toApiDocFilename
in classDefaultCodegen
- Parameters:
name
- the file name of the Api- Returns:
- the file name of the Api
-
toModelDocFilename
public String toModelDocFilename(String name)
Description copied from class:DefaultCodegen
Return the capitalized file name of the model documentation- Specified by:
toModelDocFilename
in interfaceCodegenConfig
- Overrides:
toModelDocFilename
in classDefaultCodegen
- Parameters:
name
- the model name- Returns:
- the file name of the model
-
toApiTestFilename
public String toApiTestFilename(String name)
Description copied from class:DefaultCodegen
Return the file name of the Api Test- Specified by:
toApiTestFilename
in interfaceCodegenConfig
- Overrides:
toApiTestFilename
in classDefaultCodegen
- Parameters:
name
- the file name of the Api- Returns:
- the file name of the Api
-
toModelTestFilename
public String toModelTestFilename(String name)
Description copied from class:DefaultCodegen
Return the capitalized file name of the model test- Specified by:
toModelTestFilename
in interfaceCodegenConfig
- Overrides:
toModelTestFilename
in classDefaultCodegen
- Parameters:
name
- the model name- Returns:
- the file name of the model
-
toApiFilename
public String toApiFilename(String name)
Description copied from class:DefaultCodegen
Return the file name of the Api Test- Specified by:
toApiFilename
in interfaceCodegenConfig
- Overrides:
toApiFilename
in classDefaultCodegen
- Parameters:
name
- the file name of the Api- Returns:
- the file name of the Api
-
toVarName
public String toVarName(String name)
Description copied from class:DefaultCodegen
Return the variable name by removing invalid characters and proper escaping if it's a reserved word.- Overrides:
toVarName
in classDefaultCodegen
- Parameters:
name
- the variable name- Returns:
- the sanitized variable name
-
toParamName
public String toParamName(String name)
Description copied from class:DefaultCodegen
Return the parameter name by removing invalid characters and proper escaping if it's a reserved word.- Specified by:
toParamName
in interfaceCodegenConfig
- Overrides:
toParamName
in classDefaultCodegen
- Parameters:
name
- Codegen property object- Returns:
- the sanitized parameter name
-
toModelName
public String toModelName(String name)
Description copied from class:DefaultCodegen
Converts the OpenAPI schema name to a model name suitable for the current code generator. May be overridden for each programming language. In case the name belongs to the TypeSystem it won't be renamed.- Specified by:
toModelName
in interfaceCodegenConfig
- Overrides:
toModelName
in classDefaultCodegen
- Parameters:
name
- the name of the model- Returns:
- capitalized model name
-
toModelFilename
public String toModelFilename(String name)
Description copied from class:DefaultCodegen
Return the capitalized file name of the model- Specified by:
toModelFilename
in interfaceCodegenConfig
- Overrides:
toModelFilename
in classDefaultCodegen
- Parameters:
name
- the model name- Returns:
- the file name of the model
-
getTypeDeclaration
public String getTypeDeclaration(io.swagger.v3.oas.models.media.Schema p)
Description copied from class:DefaultCodegen
Output the language-specific type declaration of the property.- Specified by:
getTypeDeclaration
in interfaceCodegenConfig
- Overrides:
getTypeDeclaration
in classDefaultCodegen
- Parameters:
p
- property schema- Returns:
- a string presentation of the property type
-
getAlias
public String getAlias(String name)
Description copied from class:DefaultCodegen
Determine the type alias for the given type if it exists. This feature was originally developed for Java because the language does not have an aliasing mechanism of its own but later extends to handle other languages- Overrides:
getAlias
in classDefaultCodegen
- Parameters:
name
- The type name.- Returns:
- The alias of the given type, if it exists. If there is no alias for this type, then returns the input type name.
-
toArrayDefaultValue
public String toArrayDefaultValue(CodegenProperty cp, io.swagger.v3.oas.models.media.Schema schema)
Return the default value of array propertyReturn null if there's no default value. Any non-null value will cause {{#defaultValue} check to pass.
- Parameters:
cp
- Codegen propertyschema
- Property schema- Returns:
- string presentation of the default value of the property
-
toDefaultValue
public String toDefaultValue(CodegenProperty cp, io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:DefaultCodegen
Return the default value of the propertyReturn null if you do NOT want a default value. Any non-null value will cause {{#defaultValue} check to pass.
- Overrides:
toDefaultValue
in classDefaultCodegen
- Parameters:
cp
- Codegen propertyschema
- Property schema- Returns:
- string presentation of the default value of the property
-
toDefaultParameterValue
public String toDefaultParameterValue(io.swagger.v3.oas.models.media.Schema<?> schema)
Description copied from class:DefaultCodegen
Return the default value of the parameterReturn null if you do NOT want a default value. Any non-null value will cause {{#defaultValue} check to pass.
- Overrides:
toDefaultParameterValue
in classDefaultCodegen
- Parameters:
schema
- Parameter schema- Returns:
- string presentation of the default value of the parameter
-
setParameterExampleValue
public void setParameterExampleValue(CodegenParameter codegenParameter, io.swagger.v3.oas.models.parameters.Parameter parameter)
Return the example value of the parameter. Overrides the setParameterExampleValue(CodegenParameter, Parameter) method in DefaultCodegen to always call setParameterExampleValue(CodegenParameter) in this class, which adds single quotes around strings from the x-example property.- Overrides:
setParameterExampleValue
in classDefaultCodegen
- Parameters:
codegenParameter
- Codegen parameterparameter
- Parameter
-
setParameterExampleValue
public void setParameterExampleValue(CodegenParameter codegenParameter, io.swagger.v3.oas.models.parameters.RequestBody requestBody)
Return the example value of the parameter. Overrides the parent method in DefaultCodegen to not set examples on complex models, as they don't compile properly.- Overrides:
setParameterExampleValue
in classDefaultCodegen
- Parameters:
codegenParameter
- Codegen parameterrequestBody
- Request body
-
setParameterExampleValue
public void setParameterExampleValue(CodegenParameter p)
Description copied from class:DefaultCodegen
Return the example value of the parameter.- Overrides:
setParameterExampleValue
in classDefaultCodegen
- Parameters:
p
- Codegen parameter
-
toExampleValue
public String toExampleValue(io.swagger.v3.oas.models.media.Schema p)
Description copied from class:DefaultCodegen
Return the example value of the propertyThis method should be overridden in the generator to meet its requirement.
- Overrides:
toExampleValue
in classDefaultCodegen
- Parameters:
p
- Property schema- Returns:
- string presentation of the example value of the property
-
getSchemaType
public String getSchemaType(io.swagger.v3.oas.models.media.Schema p)
Description copied from class:DefaultCodegen
returns the OpenAPI type for the property. Use getAlias to handle $ref of primitive type- Overrides:
getSchemaType
in classDefaultCodegen
- Parameters:
p
- property schema- Returns:
- string presentation of the type
-
toOperationId
public String toOperationId(String operationId)
Description copied from class:DefaultCodegen
Return the operation ID (method name)- Overrides:
toOperationId
in classDefaultCodegen
- Parameters:
operationId
- operation ID- Returns:
- the sanitized method name
-
fromModel
public CodegenModel fromModel(String name, io.swagger.v3.oas.models.media.Schema model)
Description copied from class:DefaultCodegen
Convert OAS Model object to Codegen Model object.- Specified by:
fromModel
in interfaceCodegenConfig
- Overrides:
fromModel
in classDefaultCodegen
- Parameters:
name
- the name of the modelmodel
- OAS Model object- Returns:
- Codegen Model object
-
postProcessModelProperty
public void postProcessModelProperty(CodegenModel model, CodegenProperty property)
- Specified by:
postProcessModelProperty
in interfaceCodegenConfig
- Overrides:
postProcessModelProperty
in classDefaultCodegen
-
postProcessResponseWithProperty
public void postProcessResponseWithProperty(CodegenResponse response, CodegenProperty property)
- Specified by:
postProcessResponseWithProperty
in interfaceCodegenConfig
- Overrides:
postProcessResponseWithProperty
in classDefaultCodegen
-
postProcessModels
public ModelsMap postProcessModels(ModelsMap objs)
- Specified by:
postProcessModels
in interfaceCodegenConfig
- Overrides:
postProcessModels
in classDefaultCodegen
-
postProcessOperationsWithModels
public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<ModelMap> allModels)
- Specified by:
postProcessOperationsWithModels
in interfaceCodegenConfig
- Overrides:
postProcessOperationsWithModels
in classDefaultCodegen
-
preprocessOpenAPI
public void preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
- Specified by:
preprocessOpenAPI
in interfaceCodegenConfig
- Overrides:
preprocessOpenAPI
in classDefaultCodegen
-
needToImport
protected boolean needToImport(String type)
Description copied from class:DefaultCodegen
Check the type to see if it needs import the library/module/package- Overrides:
needToImport
in classDefaultCodegen
- Parameters:
type
- name of the type- Returns:
- true if the library/module/package of the corresponding type needs to be imported
-
toEnumName
public String toEnumName(CodegenProperty property)
Description copied from class:DefaultCodegen
Return the Enum name (e.g. StatusEnum given 'status')- Overrides:
toEnumName
in classDefaultCodegen
- Parameters:
property
- Codegen property- Returns:
- the Enum name
-
toEnumVarName
public String toEnumVarName(String value, String datatype)
Description copied from class:DefaultCodegen
Return the sanitized variable name for enum- Overrides:
toEnumVarName
in classDefaultCodegen
- Parameters:
value
- enum variable namedatatype
- data type- Returns:
- the sanitized variable name for enum
-
toEnumValue
public String toEnumValue(String value, String datatype)
Description copied from class:DefaultCodegen
Return the enum value in the language specified format e.g. status becomes "status"- Overrides:
toEnumValue
in classDefaultCodegen
- Parameters:
value
- enum variable namedatatype
- data type- Returns:
- the sanitized value for enum
-
fromOperation
public CodegenOperation fromOperation(String path, String httpMethod, io.swagger.v3.oas.models.Operation operation, List<io.swagger.v3.oas.models.servers.Server> servers)
Description copied from class:DefaultCodegen
Convert OAS Operation object to Codegen Operation object- Specified by:
fromOperation
in interfaceCodegenConfig
- Overrides:
fromOperation
in classDefaultCodegen
- Parameters:
path
- the path of the operationhttpMethod
- HTTP methodoperation
- OAS operation objectservers
- list of servers- Returns:
- Codegen Operation object
-
getInvokerPackage
public String getInvokerPackage()
-
setInvokerPackage
public void setInvokerPackage(String invokerPackage)
-
getGroupId
public String getGroupId()
-
setGroupId
public void setGroupId(String groupId)
-
getArtifactId
public String getArtifactId()
-
setArtifactId
public void setArtifactId(String artifactId)
-
getArtifactVersion
public String getArtifactVersion()
-
setArtifactVersion
public void setArtifactVersion(String artifactVersion)
-
getArtifactUrl
public String getArtifactUrl()
-
setArtifactUrl
public void setArtifactUrl(String artifactUrl)
-
getArtifactDescription
public String getArtifactDescription()
-
setArtifactDescription
public void setArtifactDescription(String artifactDescription)
-
getScmConnection
public String getScmConnection()
-
setScmConnection
public void setScmConnection(String scmConnection)
-
getScmDeveloperConnection
public String getScmDeveloperConnection()
-
setScmDeveloperConnection
public void setScmDeveloperConnection(String scmDeveloperConnection)
-
getScmUrl
public String getScmUrl()
-
setScmUrl
public void setScmUrl(String scmUrl)
-
getDeveloperName
public String getDeveloperName()
-
setDeveloperName
public void setDeveloperName(String developerName)
-
getDeveloperEmail
public String getDeveloperEmail()
-
setDeveloperEmail
public void setDeveloperEmail(String developerEmail)
-
getDeveloperOrganization
public String getDeveloperOrganization()
-
setDeveloperOrganization
public void setDeveloperOrganization(String developerOrganization)
-
getDeveloperOrganizationUrl
public String getDeveloperOrganizationUrl()
-
setDeveloperOrganizationUrl
public void setDeveloperOrganizationUrl(String developerOrganizationUrl)
-
getLicenseName
public String getLicenseName()
-
setLicenseName
public void setLicenseName(String licenseName)
-
getLicenseUrl
public String getLicenseUrl()
-
setLicenseUrl
public void setLicenseUrl(String licenseUrl)
-
getSourceFolder
public String getSourceFolder()
-
setSourceFolder
public void setSourceFolder(String sourceFolder)
-
getTestFolder
public String getTestFolder()
-
setTestFolder
public void setTestFolder(String testFolder)
-
setSerializeBigDecimalAsString
public void setSerializeBigDecimalAsString(boolean s)
-
getSerializableModel
public Boolean getSerializableModel()
-
setSerializableModel
public void setSerializableModel(Boolean serializableModel)
-
setDiscriminatorCaseSensitive
public void setDiscriminatorCaseSensitive(boolean discriminatorCaseSensitive)
Set whether discriminator value lookup is case-sensitive or not.- Parameters:
discriminatorCaseSensitive
- true if the discriminator value lookup should be case sensitive.
-
setWithXml
public void setWithXml(boolean withXml)
-
getDateLibrary
public String getDateLibrary()
-
setDateLibrary
public void setDateLibrary(String library)
-
setSupportAsync
public void setSupportAsync(boolean enabled)
-
setDisableHtmlEscaping
public void setDisableHtmlEscaping(boolean disabled)
-
getBooleanGetterPrefix
public String getBooleanGetterPrefix()
-
setBooleanGetterPrefix
public void setBooleanGetterPrefix(String booleanGetterPrefix)
-
setIgnoreAnyOfInEnum
public void setIgnoreAnyOfInEnum(boolean ignoreAnyOfInEnum)
-
isOpenApiNullable
public boolean isOpenApiNullable()
-
setOpenApiNullable
public void setOpenApiNullable(boolean openApiNullable)
-
setOutputDir
public void setOutputDir(String dir)
- Specified by:
setOutputDir
in interfaceCodegenConfig
- Overrides:
setOutputDir
in classDefaultCodegen
-
getOutputTestFolder
public String getOutputTestFolder()
-
setOutputTestFolder
public void setOutputTestFolder(String outputTestFolder)
-
getDocumentationProvider
public DocumentationProviderFeatures.DocumentationProvider getDocumentationProvider()
- Specified by:
getDocumentationProvider
in interfaceDocumentationProviderFeatures
-
setDocumentationProvider
public void setDocumentationProvider(DocumentationProviderFeatures.DocumentationProvider documentationProvider)
- Specified by:
setDocumentationProvider
in interfaceDocumentationProviderFeatures
-
getAnnotationLibrary
public DocumentationProviderFeatures.AnnotationLibrary getAnnotationLibrary()
- Specified by:
getAnnotationLibrary
in interfaceDocumentationProviderFeatures
-
setAnnotationLibrary
public void setAnnotationLibrary(DocumentationProviderFeatures.AnnotationLibrary annotationLibrary)
- Specified by:
setAnnotationLibrary
in interfaceDocumentationProviderFeatures
-
setImplicitHeaders
public void setImplicitHeaders(boolean implicitHeaders)
-
setImplicitHeadersRegex
public void setImplicitHeadersRegex(String implicitHeadersRegex)
-
setCamelCaseDollarSign
public void setCamelCaseDollarSign(boolean camelCaseDollarSign)
-
setUseJakartaEe
public void setUseJakartaEe(boolean useJakartaEe)
-
setContainerDefaultToNull
public void setContainerDefaultToNull(boolean containerDefaultToNull)
-
escapeQuotationMark
public String escapeQuotationMark(String input)
Description copied from class:DefaultCodegen
Escape single and/or double quote to avoid code injection- Specified by:
escapeQuotationMark
in interfaceCodegenConfig
- Overrides:
escapeQuotationMark
in classDefaultCodegen
- Parameters:
input
- String to be cleaned up- Returns:
- string with quotation mark removed or escaped
-
escapeUnsafeCharacters
public String escapeUnsafeCharacters(String input)
Description copied from class:DefaultCodegen
override with any special text escaping logic to handle unsafe characters so as to avoid code injection- Specified by:
escapeUnsafeCharacters
in interfaceCodegenConfig
- Overrides:
escapeUnsafeCharacters
in classDefaultCodegen
- Parameters:
input
- String to be cleaned up- Returns:
- string with unsafe characters removed or escaped
-
toRegularExpression
public String toRegularExpression(String pattern)
Description copied from class:DefaultCodegen
Return the regular expression/JSON schema pattern (http://json-schema.org/latest/json-schema-validation.html#anchor33)- Overrides:
toRegularExpression
in classDefaultCodegen
- Parameters:
pattern
- the pattern (regular expression)- Returns:
- properly-escaped pattern
-
toBooleanGetter
public String toBooleanGetter(String name)
Output the Getter name for boolean property, e.g. isActive- Specified by:
toBooleanGetter
in interfaceCodegenConfig
- Overrides:
toBooleanGetter
in classDefaultCodegen
- Parameters:
name
- the name of the property- Returns:
- getter name based on naming convention
-
sanitizeTag
public String sanitizeTag(String tag)
Description copied from class:DefaultCodegen
Sanitize tag- Specified by:
sanitizeTag
in interfaceCodegenConfig
- Overrides:
sanitizeTag
in classDefaultCodegen
- Parameters:
tag
- Tag- Returns:
- Sanitized tag
-
getterAndSetterCapitalize
public String getterAndSetterCapitalize(String name)
Camelize the method name of the getter and setter- Overrides:
getterAndSetterCapitalize
in classDefaultCodegen
- Parameters:
name
- string to be camelized- Returns:
- Camelized string
-
postProcessFile
public void postProcessFile(File file, String fileType)
Description copied from class:DefaultCodegen
Post-process the auto-generated file, e.g. using go-fmt to format the Go code. The file type can be "model-test", "model-doc", "model", "api", "api-test", "api-doc", "supporting-mustache", "supporting-common", "openapi-generator-ignore", "openapi-generator-version"TODO: store these values in enum instead
- Specified by:
postProcessFile
in interfaceCodegenConfig
- Overrides:
postProcessFile
in classDefaultCodegen
- Parameters:
file
- file to be processedfileType
- file type
-
setParentGroupId
public void setParentGroupId(String parentGroupId)
-
setParentArtifactId
public void setParentArtifactId(String parentArtifactId)
-
setParentVersion
public void setParentVersion(String parentVersion)
-
setParentOverridden
public void setParentOverridden(boolean parentOverridden)
-
setAdditionalModelTypeAnnotations
public void setAdditionalModelTypeAnnotations(List<String> additionalModelTypeAnnotations)
-
setAdditionalOneOfTypeAnnotations
public void setAdditionalOneOfTypeAnnotations(List<String> additionalOneOfTypeAnnotations)
-
setAdditionalEnumTypeAnnotations
public void setAdditionalEnumTypeAnnotations(List<String> additionalEnumTypeAnnotations)
-
addAdditionPropertiesToCodeGenModel
protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, io.swagger.v3.oas.models.media.Schema schema)
Description copied from class:DefaultCodegen
Handle the model for the 'additionalProperties' keyword in the OAS schema.- Overrides:
addAdditionPropertiesToCodeGenModel
in classDefaultCodegen
- Parameters:
codegenModel
- The codegen representation of the schema.schema
- The input OAS schema.
-
findByName
protected Optional<CodegenProperty> findByName(String name, List<CodegenProperty> properties)
Search for property byCodegenProperty.name
- Parameters:
name
- name to search forproperties
- list of properties- Returns:
- either found property or
Optional.empty()
if nothing has been found
-
handleImplicitHeaders
protected void handleImplicitHeaders(CodegenOperation operation)
This method removes all implicit header parameters from the list of parameters- Parameters:
operation
- - operation to be processed
-
addImportsToOneOfInterface
public void addImportsToOneOfInterface(List<Map<String,String>> imports)
- Overrides:
addImportsToOneOfInterface
in classDefaultCodegen
-
getSupportedVendorExtensions
public List<VendorExtension> getSupportedVendorExtensions()
- Specified by:
getSupportedVendorExtensions
in interfaceCodegenConfig
- Overrides:
getSupportedVendorExtensions
in classDefaultCodegen
-
isAddNullableImports
public boolean isAddNullableImports(CodegenModel cm, boolean addImports, CodegenProperty var)
-
-