Class KotlinSpringServerCodegen
- java.lang.Object
-
- org.openapitools.codegen.DefaultCodegen
-
- org.openapitools.codegen.languages.AbstractKotlinCodegen
-
- org.openapitools.codegen.languages.KotlinSpringServerCodegen
-
- All Implemented Interfaces:
CodegenConfig
,BeanValidationFeatures
,DocumentationProviderFeatures
,SwaggerUIFeatures
public class KotlinSpringServerCodegen extends AbstractKotlinCodegen implements BeanValidationFeatures, DocumentationProviderFeatures, SwaggerUIFeatures
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openapitools.codegen.languages.AbstractKotlinCodegen
AbstractKotlinCodegen.SERIALIZATION_LIBRARY_TYPE
-
Nested classes/interfaces inherited from interface org.openapitools.codegen.languages.features.DocumentationProviderFeatures
DocumentationProviderFeatures.AnnotationLibrary, DocumentationProviderFeatures.DocumentationProvider
-
-
Field Summary
Fields Modifier and Type Field Description static String
BASE_PACKAGE
static String
BEAN_QUALIFIERS
static String
CLOSE_BRACE
static String
CONFIG_PACKAGE
protected String
configPackage
static String
DELEGATE_PATTERN
static String
EXCEPTION_HANDLER
static String
GRADLE_BUILD_FILE
static String
INTERFACE_ONLY
static String
OPEN_BRACE
static String
REACTIVE
static String
SERVER_PORT
static String
SERVICE_IMPLEMENTATION
static String
SERVICE_INTERFACE
static String
SKIP_DEFAULT_INTERFACE
static String
SPRING_BOOT
static String
SPRING_CLOUD_LIBRARY
static String
TITLE
static String
USE_FEIGN_CLIENT
static String
USE_FEIGN_CLIENT_URL
static String
USE_SPRING_BOOT3
static String
USE_TAGS
protected boolean
useFeignClient
protected boolean
useFeignClientUrl
protected boolean
useSpringBoot3
protected boolean
useTags
-
Fields inherited from class org.openapitools.codegen.languages.AbstractKotlinCodegen
ADDITIONAL_MODEL_TYPE_ANNOTATIONS, additionalModelTypeAnnotations, apiDocPath, apiSuffix, artifactId, artifactVersion, enumPropertyNaming, groupId, JAVAX_PACKAGE, MODEL_MUTABLE, MODEL_MUTABLE_DESC, modelDocPath, nonPublicApi, packageName, parcelizeModels, propertyAdditionalKeywords, resourcesFolder, serializableModel, SERIALIZATION_LIBRARY_DESC, serializationLibrary, sourceFolder, testFolder, USE_JAKARTA_EE, useJakartaEe
-
Fields inherited from class org.openapitools.codegen.DefaultCodegen
additionalProperties, addOneOfInterfaceImports, addOneOfInterfaces, addSuffixToDuplicateOperationNicknames, allowUnicodeIdentifiers, apiDocTemplateFiles, apiNamePrefix, apiNameSuffix, apiPackage, apiTemplateFiles, apiTestTemplateFiles, cliOptions, DefaultFeatureSet, defaultIncludes, disallowAdditionalPropertiesIfNotPresent, docExtension, embeddedTemplateDir, enableMinimalUpdate, enablePostProcessFile, ensureUniqueParams, enumUnknownDefaultCase, enumUnknownDefaultCaseName, falseSchema, filesMetadataFilename, fileSuffix, generatorMetadata, gitHost, gitRepoId, gitUserId, hideGenerationTimestamp, httpUserAgent, ignoreFilePathOverride, importBaseType, importContainerType, importMapping, inlineSchemaNameDefault, inlineSchemaNameMapping, inputSpec, instantiationTypes, JSON_MIME_PATTERN, JSON_VENDOR_MIME_PATTERN, languageSpecificPrimitives, legacyDiscriminatorBehavior, library, loadDeepObjectIntoItems, modelDocTemplateFiles, modelNamePrefix, modelNameSuffix, modelPackage, modelTemplateFiles, modelTestTemplateFiles, openAPI, openapiNormalizer, outputFolder, prependFormOrBodyParameters, releaseNote, removeEnumValuePrefix, removeOperationIdPrefix, removeOperationIdPrefixCount, removeOperationIdPrefixDelimiter, reservedWords, reservedWordsMappings, schemaMapping, serverVariables, skipOperationExample, skipOverwrite, sortModelPropertiesByRequiredFlag, sortParamsByRequiredFlag, specialCharReplacements, strictSpecBehavior, supportedLibraries, supportingFiles, supportsAdditionalPropertiesWithComposedSchema, supportsInheritance, supportsMixins, supportsMultipleInheritance, templateDir, testPackage, trueSchema, typeAliases, typeMapping, useOneOfInterfaces, vendorExtensions, versionMetadataFilename
-
Fields inherited from interface org.openapitools.codegen.languages.features.BeanValidationFeatures
USE_BEANVALIDATION
-
Fields inherited from interface org.openapitools.codegen.languages.features.DocumentationProviderFeatures
ANNOTATION_LIBRARY, DOCUMENTATION_PROVIDER
-
Fields inherited from interface org.openapitools.codegen.languages.features.SwaggerUIFeatures
USE_SWAGGER_UI
-
-
Constructor Summary
Constructors Constructor Description KotlinSpringServerCodegen()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.google.common.collect.ImmutableMap.Builder<String,com.samskivert.mustache.Mustache.Lambda>
addMustacheLambdas()
Preset map builder with commonly used Mustache lambdas.void
addOperationToGroup(String tag, String resourcePath, io.swagger.v3.oas.models.Operation operation, CodegenOperation co, Map<String,List<CodegenOperation>> operations)
Add operation to groupDocumentationProviderFeatures.DocumentationProvider
defaultDocumentationProvider()
Define the default documentation Provider for CliOpts processing.DocumentationProviderFeatures.AnnotationLibrary
getAnnotationLibrary()
String
getBasePackage()
String
getConfigPackage()
DocumentationProviderFeatures.DocumentationProvider
getDocumentationProvider()
boolean
getExceptionHandler()
boolean
getGradleBuildFile()
String
getHelp()
String
getInvokerPackage()
String
getName()
String
getServerPort()
boolean
getServiceImplementation()
boolean
getServiceInterface()
CodegenType
getTag()
boolean
getUseBeanValidation()
boolean
getUseSwaggerUI()
boolean
isReactive()
boolean
isUseSpringBoot3()
protected boolean
needToImport(String type)
Check the type to see if it needs import the library/module/packagevoid
postProcessModelProperty(CodegenModel model, CodegenProperty property)
ModelsMap
postProcessModelsEnum(ModelsMap objs)
post process enum defined in model's propertiesOperationsMap
postProcessOperationsWithModels(OperationsMap objs, List<ModelMap> allModels)
Map<String,Object>
postProcessSupportingFileData(Map<String,Object> objs)
void
preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
void
processOpts()
void
setAnnotationLibrary(DocumentationProviderFeatures.AnnotationLibrary annotationLibrary)
void
setBasePackage(String basePackage)
void
setBeanQualifiers(boolean beanQualifiers)
void
setConfigPackage(String configPackage)
void
setDelegatePattern(boolean delegatePattern)
void
setDocumentationProvider(DocumentationProviderFeatures.DocumentationProvider documentationProvider)
void
setExceptionHandler(boolean exceptionHandler)
void
setGradleBuildFile(boolean gradleBuildFile)
void
setInterfaceOnly(boolean interfaceOnly)
void
setInvokerPackage(String invokerPackage)
void
setReactive(boolean reactive)
void
setServerPort(String serverPort)
void
setServiceImplementation(boolean serviceImplementation)
void
setServiceInterface(boolean serviceInterface)
void
setSkipDefaultInterface(boolean skipDefaultInterface)
void
setUseBeanValidation(boolean useBeanValidation)
void
setUseFeignClient(boolean useFeignClient)
void
setUseFeignClientUrl(boolean useFeignClientUrl)
void
setUseSpringBoot3(boolean isSpringBoot3)
void
setUseSwaggerUI(boolean useSwaggerUI)
void
setUseTags(boolean useTags)
List<DocumentationProviderFeatures.AnnotationLibrary>
supportedAnnotationLibraries()
Define the list of supported annotation libraries for CliOpts processing.List<DocumentationProviderFeatures.DocumentationProvider>
supportedDocumentationProvider()
Define the List of supported documentation Provider for CliOpts processing.String
toModelName(String name)
Output the proper model name (capitalized).-
Methods inherited from class org.openapitools.codegen.languages.AbstractKotlinCodegen
apiDocFileFolder, apiFileFolder, apiTestFileFolder, applyJakartaPackage, applyJavaxPackage, escapeQuotationMark, escapeReservedWord, escapeUnsafeCharacters, fromModel, generatorLanguage, getAdditionalModelTypeAnnotations, getEnumPropertyNaming, getParcelizeModels, getSchemaType, getSerializationLibrary, getTypeDeclaration, isDataTypeString, isModelMutable, isReservedWord, isSerializableModel, modelDocFileFolder, modelFileFolder, nonPublicApi, postProcessAllModels, postProcessFile, postProcessModels, setAdditionalModelTypeAnnotations, setApiSuffix, setArtifactId, setArtifactVersion, setEnumPropertyNaming, setGroupId, setNonPublicApi, setPackageName, setParcelizeModels, setSerializableModel, setSerializationLibrary, setSourceFolder, setTestFolder, setUseJakartaEe, toApiName, toDefaultValue, toEnumName, toEnumValue, toEnumVarName, toModelFilename, toModelImport, toOperationId, toParamName, toRegularExpression, toVariableName, toVarName, updateModelForObject
-
Methods inherited from class org.openapitools.codegen.DefaultCodegen
addAdditionPropertiesToCodeGenModel, addBodyModelSchema, addHeaders, addImport, addImport, addImport, addImports, addImports, addImports, addImportsForPropertyType, addImportsToOneOfInterface, additionalProperties, addOneOfInterfaceModel, addOneOfNameExtension, addOption, addOption, addParentContainer, addProperties, addRegularExpressionDelimiter, addRequiredVarsMap, addSwitch, addVars, addVars, addVarsRequiredVarsAdditionalProps, apiDocFilename, apiDocTemplateFiles, apiFilename, apiPackage, apiTemplateFiles, apiTestFilename, apiTestTemplateFiles, buildEnumVars, buildLibraryCliOption, cliOptions, convertPropertyToBoolean, convertPropertyToBooleanAndWriteBack, createDiscriminator, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, findCommonPrefixOfVars, findMethodResponse, fromCallback, fromFormProperty, fromOperation, fromParameter, fromProperty, fromProperty, fromProperty, fromRequestBody, fromRequestBodyToFormParameters, fromResponse, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generateJSONSpecFile, generateYAMLSpecFile, generatorLanguageVersion, getAdditionalProperties, getAdditionalPropertiesName, getAddSuffixToDuplicateOperationNicknames, getAlias, getAllModels, getAllOfDescendants, getAllowUnicodeIdentifiers, getApiNamePrefix, getApiNameSuffix, getCollectionFormat, getCollectionFormat, getConsumesInfo, getContent, getContentType, getDisallowAdditionalPropertiesIfNotPresent, getDocExtension, getEnsureUniqueParams, getEnumDefaultValue, getEnumUnknownDefaultCase, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHttpUserAgent, getIgnoreFilePathOverride, getInnerEnumAllowableValues, getInputSpec, getItemsName, getLegacyDiscriminatorBehavior, getLibrary, getModelNamePrefix, getModelNameSuffix, getModelNameToSchemaCache, getMostInnerItems, getOneOfAnyOfDescendants, getOrGenerateOperationId, getOutputDir, getParameterDataType, getPrependFormOrBodyParameters, getProducesInfo, getReleaseNote, getRemoveOperationIdPrefixCount, getRemoveOperationIdPrefixDelimiter, getSchemaAdditionalProperties, getSchemaFromBooleanOrSchema, getSchemaItems, getSingleSchemaType, getSortModelPropertiesByRequiredFlag, getSortParamsByRequiredFlag, getSupportedVendorExtensions, getSymbolName, getTemplatingEngine, getterAndSetterCapitalize, getTypeDeclaration, getUseInlineModelResolver, getUseOneOfInterfaces, getUseOpenAPINormalizer, getVersionMetadataFilename, handleMethodResponse, handleMethodResponse, handleSpecialCharacters, hasBodyParameter, hasFormParameter, importMapping, initializeSpecialCharacterMapping, inlineSchemaNameDefault, inlineSchemaNameMapping, instantiationTypes, isAnyTypeSchema, isDataTypeBinary, isDataTypeFile, isEnableMinimalUpdate, isEnablePostProcessFile, isFreeFormObject, isHideGenerationTimestamp, isJsonMimeType, isJsonVendorMimeType, isLibrary, isParameterNameUnique, isPropertyInnerMostEnum, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isSkipOperationExample, isSkipOverwrite, isStrictSpecBehavior, languageSpecificPrimitives, lowerCamelCase, modelDocTemplateFiles, modelFilename, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, modifyFeatureSet, openapiNormalizer, outputFolder, postProcess, postProcessParameter, processCompiler, processOpenAPI, processTemplatingEngine, processTestExampleData, removeImport, removeNonNameElementToCamelCase, removeNonNameElementToCamelCase, removeOption, removeSelfReferenceImports, reservedWords, reservedWordsMappings, sanitizeName, sanitizeName, sanitizeName, sanitizeTag, schemaMapping, serverVariableOverrides, setAddProps, setAllowUnicodeIdentifiers, setApiNamePrefix, setApiNameSuffix, setApiPackage, setCircularReferences, setDisallowAdditionalPropertiesIfNotPresent, setDocExtension, setEnableMinimalUpdate, setEnablePostProcessFile, setEnsureUniqueParams, setEnumUnknownDefaultCase, setFilesMetadataFilename, setGitHost, setGitRepoId, setGitUserId, setHideGenerationTimestamp, setHttpUserAgent, setIgnoreFilePathOverride, setInputSpec, setLegacyDiscriminatorBehavior, setLibrary, setModelNamePrefix, setModelNameSuffix, setModelPackage, setNonArrayMapProperty, setOpenAPI, setOutputDir, setParameterBooleanFlagWithCodegenProperty, setParameterEncodingValues, setParameterExamples, setParameterExampleValue, setParameterExampleValue, setParameterExampleValue, setParameterNullable, setPrependFormOrBodyParameters, setReleaseNote, setRemoveEnumValuePrefix, setRemoveOperationIdPrefix, setRemoveOperationIdPrefixCount, setRemoveOperationIdPrefixDelimiter, setReservedWordsLowerCase, setSkipOperationExample, setSkipOverwrite, setSortModelPropertiesByRequiredFlag, setSortParamsByRequiredFlag, setStrictSpecBehavior, setTemplateDir, setTemplatingEngine, setUseOneOfInterfaces, setVersionMetadataFilename, shouldAddImport, shouldOverwrite, supportedLibraries, supportingFiles, templateDir, testPackage, toAllOfName, toAnyOfName, toApiDocFilename, toApiFilename, toApiImport, toApiTestFilename, toApiVarName, toArrayModelParamName, toBooleanGetter, toDefaultParameterValue, toDefaultParameterValue, toDefaultValue, toDefaultValueWithParam, toEnumDefaultValue, toExamples, toExampleValue, toGetter, toInstantiationType, toMediaTypeSchemaName, toModelDocFilename, toModelImportMap, toModelTestFilename, toOneOfName, toSetter, toTestCaseName, typeMapping, unaliasPropertySchema, unaliasSchema, updateAllModels, updateCodegenPropertyEnum, updateDataTypeWithEnumForArray, updateDataTypeWithEnumForMap, updateEnumVarsWithExtensions, updateModelForAnyType, updateModelForComposedSchema, updateModelForInteger, updateModelForNumber, 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, apiDocFilename, apiDocTemplateFiles, apiFilename, apiPackage, apiTemplateFiles, apiTestFilename, apiTestTemplateFiles, cliOptions, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, fromOperation, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generatorLanguageVersion, getAddSuffixToDuplicateOperationNicknames, getDocExtension, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHttpUserAgent, getIgnoreFilePathOverride, getInputSpec, getLibrary, getOutputDir, getReleaseNote, getSupportedVendorExtensions, getTemplatingEngine, getTypeDeclaration, getUseInlineModelResolver, getUseOpenAPINormalizer, getVersionMetadataFilename, importMapping, inlineSchemaNameDefault, inlineSchemaNameMapping, instantiationTypes, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isSkipOperationExample, isSkipOverwrite, isStrictSpecBehavior, languageSpecificPrimitives, modelDocTemplateFiles, modelFilename, modelPackage, modelTemplateFiles, modelTestFileFolder, modelTestTemplateFiles, openapiNormalizer, outputFolder, postProcess, postProcessParameter, processCompiler, processOpenAPI, processTemplatingEngine, reservedWords, reservedWordsMappings, sanitizeName, sanitizeTag, schemaMapping, serverVariableOverrides, setDocExtension, setEnableMinimalUpdate, setEnablePostProcessFile, setGitHost, setGitRepoId, setGitUserId, setHideGenerationTimestamp, setHttpUserAgent, setIgnoreFilePathOverride, setInputSpec, setLibrary, setOpenAPI, setOutputDir, setReleaseNote, setRemoveEnumValuePrefix, setRemoveOperationIdPrefix, setSkipOperationExample, setSkipOverwrite, setStrictSpecBehavior, setTemplatingEngine, shouldOverwrite, supportedLibraries, supportingFiles, templateDir, testPackage, toApiDocFilename, toApiFilename, toApiImport, toApiTestFilename, toApiVarName, toBooleanGetter, toGetter, toModelDocFilename, toModelImportMap, toModelTestFilename, toSetter, typeMapping, unaliasSchema, updateAllModels, vendorExtensions
-
-
-
-
Field Detail
-
OPEN_BRACE
public static final String OPEN_BRACE
- See Also:
- Constant Field Values
-
CLOSE_BRACE
public static final String CLOSE_BRACE
- See Also:
- Constant Field Values
-
TITLE
public static final String TITLE
- See Also:
- Constant Field Values
-
SERVER_PORT
public static final String SERVER_PORT
- See Also:
- Constant Field Values
-
CONFIG_PACKAGE
public static final String CONFIG_PACKAGE
- See Also:
- Constant Field Values
-
BASE_PACKAGE
public static final String BASE_PACKAGE
- See Also:
- Constant Field Values
-
SPRING_BOOT
public static final String SPRING_BOOT
- See Also:
- Constant Field Values
-
SPRING_CLOUD_LIBRARY
public static final String SPRING_CLOUD_LIBRARY
- See Also:
- Constant Field Values
-
EXCEPTION_HANDLER
public static final String EXCEPTION_HANDLER
- See Also:
- Constant Field Values
-
GRADLE_BUILD_FILE
public static final String GRADLE_BUILD_FILE
- See Also:
- Constant Field Values
-
SERVICE_INTERFACE
public static final String SERVICE_INTERFACE
- See Also:
- Constant Field Values
-
SERVICE_IMPLEMENTATION
public static final String SERVICE_IMPLEMENTATION
- See Also:
- Constant Field Values
-
SKIP_DEFAULT_INTERFACE
public static final String SKIP_DEFAULT_INTERFACE
- See Also:
- Constant Field Values
-
REACTIVE
public static final String REACTIVE
- See Also:
- Constant Field Values
-
INTERFACE_ONLY
public static final String INTERFACE_ONLY
- See Also:
- Constant Field Values
-
USE_FEIGN_CLIENT_URL
public static final String USE_FEIGN_CLIENT_URL
- See Also:
- Constant Field Values
-
USE_FEIGN_CLIENT
public static final String USE_FEIGN_CLIENT
- See Also:
- Constant Field Values
-
DELEGATE_PATTERN
public static final String DELEGATE_PATTERN
- See Also:
- Constant Field Values
-
USE_TAGS
public static final String USE_TAGS
- See Also:
- Constant Field Values
-
BEAN_QUALIFIERS
public static final String BEAN_QUALIFIERS
- See Also:
- Constant Field Values
-
USE_SPRING_BOOT3
public static final String USE_SPRING_BOOT3
- See Also:
- Constant Field Values
-
configPackage
protected String configPackage
-
useFeignClientUrl
protected boolean useFeignClientUrl
-
useFeignClient
protected boolean useFeignClient
-
useTags
protected boolean useTags
-
useSpringBoot3
protected boolean useSpringBoot3
-
-
Method Detail
-
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
-
defaultDocumentationProvider
public DocumentationProviderFeatures.DocumentationProvider defaultDocumentationProvider()
Description copied from interface:DocumentationProviderFeatures
Define the default documentation Provider for CliOpts processing. A NULL return value will disable the documentation provider support. Override in subclasses to customize.- Specified by:
defaultDocumentationProvider
in interfaceDocumentationProviderFeatures
- Returns:
- the default documentation provider
-
supportedDocumentationProvider
public List<DocumentationProviderFeatures.DocumentationProvider> supportedDocumentationProvider()
Description copied from interface:DocumentationProviderFeatures
Define the List of supported documentation Provider for CliOpts processing. Override in subclasses to customize.- Specified by:
supportedDocumentationProvider
in interfaceDocumentationProviderFeatures
- Returns:
- the list of supported documentation provider
-
supportedAnnotationLibraries
public List<DocumentationProviderFeatures.AnnotationLibrary> supportedAnnotationLibraries()
Description copied from interface:DocumentationProviderFeatures
Define the list of supported annotation libraries for CliOpts processing. Override in subclasses to customize.- Specified by:
supportedAnnotationLibraries
in interfaceDocumentationProviderFeatures
- Returns:
- the list of supported annotation libraries
-
setConfigPackage
public void setConfigPackage(String configPackage)
-
getConfigPackage
public String getConfigPackage()
-
getBasePackage
public String getBasePackage()
-
setBasePackage
public void setBasePackage(String basePackage)
-
getInvokerPackage
public String getInvokerPackage()
-
setInvokerPackage
public void setInvokerPackage(String invokerPackage)
-
getServerPort
public String getServerPort()
-
setServerPort
public void setServerPort(String serverPort)
-
getExceptionHandler
public boolean getExceptionHandler()
-
setExceptionHandler
public void setExceptionHandler(boolean exceptionHandler)
-
getGradleBuildFile
public boolean getGradleBuildFile()
-
setGradleBuildFile
public void setGradleBuildFile(boolean gradleBuildFile)
-
getUseSwaggerUI
public boolean getUseSwaggerUI()
-
setUseSwaggerUI
public void setUseSwaggerUI(boolean useSwaggerUI)
- Specified by:
setUseSwaggerUI
in interfaceSwaggerUIFeatures
-
getServiceInterface
public boolean getServiceInterface()
-
setServiceInterface
public void setServiceInterface(boolean serviceInterface)
-
setUseFeignClientUrl
public void setUseFeignClientUrl(boolean useFeignClientUrl)
-
getServiceImplementation
public boolean getServiceImplementation()
-
setServiceImplementation
public void setServiceImplementation(boolean serviceImplementation)
-
getUseBeanValidation
public boolean getUseBeanValidation()
-
setInterfaceOnly
public void setInterfaceOnly(boolean interfaceOnly)
-
setDelegatePattern
public void setDelegatePattern(boolean delegatePattern)
-
setUseTags
public void setUseTags(boolean useTags)
-
setUseSpringBoot3
public void setUseSpringBoot3(boolean isSpringBoot3)
-
isUseSpringBoot3
public boolean isUseSpringBoot3()
-
setUseBeanValidation
public void setUseBeanValidation(boolean useBeanValidation)
- Specified by:
setUseBeanValidation
in interfaceBeanValidationFeatures
-
setUseFeignClient
public void setUseFeignClient(boolean useFeignClient)
-
setSkipDefaultInterface
public void setSkipDefaultInterface(boolean skipDefaultInterface)
-
isReactive
public boolean isReactive()
-
setReactive
public void setReactive(boolean reactive)
-
setBeanQualifiers
public void setBeanQualifiers(boolean beanQualifiers)
-
getTag
public CodegenType getTag()
- Specified by:
getTag
in interfaceCodegenConfig
- Overrides:
getTag
in classDefaultCodegen
-
getName
public String getName()
- Specified by:
getName
in interfaceCodegenConfig
- Overrides:
getName
in classDefaultCodegen
-
getHelp
public String getHelp()
- Specified by:
getHelp
in interfaceCodegenConfig
- Overrides:
getHelp
in classDefaultCodegen
-
processOpts
public void processOpts()
- Specified by:
processOpts
in interfaceCodegenConfig
- Overrides:
processOpts
in classAbstractKotlinCodegen
-
addMustacheLambdas
protected com.google.common.collect.ImmutableMap.Builder<String,com.samskivert.mustache.Mustache.Lambda> addMustacheLambdas()
Description copied from class:DefaultCodegen
Preset map builder with commonly used Mustache lambdas. To extend the map, override addMustacheLambdas(), call parent method first and then add additional lambdas to the returned builder. If common lambdas are not desired, override addMustacheLambdas() method and return empty builder.- Overrides:
addMustacheLambdas
in classDefaultCodegen
- Returns:
- preinitialized map with common lambdas
-
addOperationToGroup
public void addOperationToGroup(String tag, String resourcePath, io.swagger.v3.oas.models.Operation operation, CodegenOperation co, Map<String,List<CodegenOperation>> operations)
Description copied from class:DefaultCodegen
Add operation to group- Specified by:
addOperationToGroup
in interfaceCodegenConfig
- Overrides:
addOperationToGroup
in classDefaultCodegen
- Parameters:
tag
- name of the tagresourcePath
- path of the resourceoperation
- OAS Operation objectco
- Codegen Operation objectoperations
- map of Codegen operations
-
preprocessOpenAPI
public void preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
- Specified by:
preprocessOpenAPI
in interfaceCodegenConfig
- Overrides:
preprocessOpenAPI
in classDefaultCodegen
-
postProcessModelProperty
public void postProcessModelProperty(CodegenModel model, CodegenProperty property)
- Specified by:
postProcessModelProperty
in interfaceCodegenConfig
- Overrides:
postProcessModelProperty
in classDefaultCodegen
-
postProcessModelsEnum
public ModelsMap postProcessModelsEnum(ModelsMap objs)
Description copied from class:DefaultCodegen
post process enum defined in model's properties- Overrides:
postProcessModelsEnum
in classDefaultCodegen
- Parameters:
objs
- Map of models- Returns:
- maps of models with better enum support
-
postProcessOperationsWithModels
public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<ModelMap> allModels)
- Specified by:
postProcessOperationsWithModels
in interfaceCodegenConfig
- Overrides:
postProcessOperationsWithModels
in classDefaultCodegen
-
postProcessSupportingFileData
public Map<String,Object> postProcessSupportingFileData(Map<String,Object> objs)
- Specified by:
postProcessSupportingFileData
in interfaceCodegenConfig
- Overrides:
postProcessSupportingFileData
in classDefaultCodegen
-
toModelName
public String toModelName(String name)
Output the proper model name (capitalized). In case the name belongs to the TypeSystem it won't be renamed.- Specified by:
toModelName
in interfaceCodegenConfig
- Overrides:
toModelName
in classAbstractKotlinCodegen
- Parameters:
name
- the name of the model- Returns:
- capitalized model name
-
needToImport
protected boolean needToImport(String type)
Check the type to see if it needs import the library/module/package- Overrides:
needToImport
in classAbstractKotlinCodegen
- Parameters:
type
- name of the type- Returns:
- true if the library/module/package of the corresponding type needs to be imported
-
-