Package io.micronaut.openapi.generator
Class KotlinMicronautServerCodegen
java.lang.Object
org.openapitools.codegen.DefaultCodegen
org.openapitools.codegen.languages.AbstractKotlinCodegen
io.micronaut.openapi.generator.AbstractMicronautKotlinCodegen<KotlinMicronautServerOptionsBuilder>
io.micronaut.openapi.generator.KotlinMicronautServerCodegen
- All Implemented Interfaces:
MicronautCodeGenerator<KotlinMicronautServerOptionsBuilder>
,org.openapitools.codegen.CodegenConfig
,org.openapitools.codegen.languages.features.BeanValidationFeatures
public class KotlinMicronautServerCodegen
extends AbstractMicronautKotlinCodegen<KotlinMicronautServerOptionsBuilder>
The generator for creating Micronaut servers.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openapitools.codegen.languages.AbstractKotlinCodegen
org.openapitools.codegen.languages.AbstractKotlinCodegen.DataTypeAssigner
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
protected boolean
protected static final String
protected static final String
protected String
static final String
static final String
protected static final String
protected static final String
protected String
static final String
static final String
static final String
protected boolean
protected boolean
protected boolean
protected boolean
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected boolean
Fields inherited from class io.micronaut.openapi.generator.AbstractMicronautKotlinCodegen
allModels, appName, CONTENT_TYPE_ANY, CONTENT_TYPE_APPLICATION_FORM_URLENCODED, CONTENT_TYPE_APPLICATION_JSON, CONTENT_TYPE_MULTIPART_FORM_DATA, dateLibrary, fluxForArrays, generatedAnnotation, generateHttpResponseAlways, generateHttpResponseWhereRequired, generateOperationOnlyForFirstTag, generateSwaggerAnnotations, ksp, OPT_APPLICATION_NAME, OPT_DATE_FORMAT, OPT_DATE_LIBRARY_LOCAL_DATETIME, OPT_DATE_LIBRARY_OFFSET_DATETIME, OPT_DATE_LIBRARY_ZONED_DATETIME, OPT_DATETIME_FORMAT, OPT_FLUX_FOR_ARRAYS, OPT_GENERATE_HTTP_RESPONSE_ALWAYS, OPT_GENERATE_HTTP_RESPONSE_WHERE_REQUIRED, OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG, OPT_GENERATE_SWAGGER_ANNOTATIONS, OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE, OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2, OPT_GENERATE_SWAGGER_ANNOTATIONS_TRUE, OPT_GENERATED_ANNOTATION, OPT_KSP, OPT_REACTIVE, OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR, OPT_TEST, OPT_TEST_JUNIT, OPT_TITLE, OPT_USE_AUTH, OPT_USE_PLURAL, OPT_VISITABLE, parameterMappings, plural, random, reactive, requiredPropertiesInConstructor, responseBodyMappings, serializationLibrary, testTool, title, useBeanValidation, visitable
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, sourceFolder, testFolder, USE_JAKARTA_EE, useJakartaEe
Fields inherited from class org.openapitools.codegen.DefaultCodegen
additionalProperties, addOneOfInterfaceImports, addOneOfInterfaces, addSuffixToDuplicateOperationNicknames, allowUnicodeIdentifiers, apiDocTemplateFiles, apiNamePrefix, apiNameSuffix, 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, operationIdNameMapping, 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.BeanValidationFeatures
USE_BEANVALIDATION
-
Method Summary
Modifier and TypeMethodDescriptionapiTestFilename
(String templateName, String tag) getHelp()
getName()
org.openapitools.codegen.CodegenType
getTag()
boolean
isServer()
org.openapitools.codegen.model.OperationsMap
postProcessOperationsWithModels
(org.openapitools.codegen.model.OperationsMap objs, List<org.openapitools.codegen.model.ModelMap> allModels) void
void
setControllerPackage
(String controllerPackage) void
setGenerateControllerFromExamples
(boolean generateControllerFromExamples) void
setGenerateImplementationFiles
(boolean generateImplementationFiles) void
setGenerateOperationsToReturnNotImplemented
(boolean generateOperationsToReturnNotImplemented) void
setParameterExampleValue
(org.openapitools.codegen.CodegenParameter p) void
setUseAuth
(boolean useAuth) Methods inherited from class io.micronaut.openapi.generator.AbstractMicronautKotlinCodegen
addEnumNameMapping, addImportMapping, addInlineSchemaNameMapping, addInlineSchemaOption, addModelNameMapping, addMustacheLambdas, addNameMapping, addOpenapiNormalizer, addOperationToGroup, addParameterMappings, addResponseBodyMappings, addSchemaMapping, addTypeMapping, fromModel, fromOperation, fromParameter, fromProperty, getExampleValue, getPackageName, getParameterExampleValue, getPropertyExampleValue, getTypeDeclaration, isNumeric, isVisitable, modelTestFileFolder, postProcessAllModels, preprocessOpenAPI, sanitizeTag, setApiPackage, setArtifactId, setDateTimeLibrary, setFluxForArrays, setGeneratedAnnotation, setGenerateHttpResponseAlways, setGenerateHttpResponseWhereRequired, setInvokerPackage, setKsp, setModelPackage, setParameterExampleValue, setPlural, setReactive, setSerializationLibrary, setTestTool, setUseBeanValidation, setVisitable, testFileFolder, toApiTestFilename, toApiVarName, toEnumValue, toEnumVarName, toModelName, toModelTestFilename, toVarName
Methods inherited from class org.openapitools.codegen.languages.AbstractKotlinCodegen
apiDocFileFolder, apiFileFolder, applyJakartaPackage, applyJavaxPackage, doDataTypeAssignment, escapeQuotationMark, escapeReservedWord, escapeUnsafeCharacters, generatorLanguage, getAdditionalModelTypeAnnotations, getEnumPropertyNaming, getParcelizeModels, getSchemaType, isDataTypeString, isModelMutable, isReservedWord, isSerializableModel, modelDocFileFolder, modelFileFolder, needToImport, nonPublicApi, postProcessFile, postProcessModels, setAdditionalModelTypeAnnotations, setApiSuffix, setArtifactVersion, setEnumPropertyNaming, setGroupId, setNonPublicApi, setPackageName, setParcelizeModels, setSerializableModel, setSourceFolder, setTestFolder, setUseJakartaEe, toApiName, toDefaultParameterValue, toDefaultValue, toEnumName, toModelFilename, toModelImport, toOperationId, toParamName, toRegularExpression, toVariableName, 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, addParentFromContainer, addProperties, addRegularExpressionDelimiter, addRequiredVarsMap, addSwitch, addVars, addVars, addVarsRequiredVarsAdditionalProps, apiDocFilename, apiDocTemplateFiles, apiFilename, apiFilename, apiPackage, apiTemplateFiles, apiTestTemplateFiles, buildEnumVars, buildLibraryCliOption, cliOptions, convertPropertyToBoolean, convertPropertyToBooleanAndWriteBack, createDiscriminator, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, findCommonPrefixOfVars, findMethodResponse, fromCallback, fromFormProperty, fromProperty, fromProperty, fromRequestBody, fromRequestBodyToFormParameters, fromResponse, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generateJSONSpecFile, generateYAMLSpecFile, generatorLanguageVersion, 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, getOpenAPIGeneratorIgnoreList, getOrGenerateOperationId, getOutputDir, getParameterDataType, getPrependFormOrBodyParameters, getProducesInfo, getReleaseNote, getRemoveOperationIdPrefixCount, getRemoveOperationIdPrefixDelimiter, getSchemaAdditionalProperties, getSchemaFromBooleanOrSchema, getSchemaItems, getSingleSchemaType, getSortModelPropertiesByRequiredFlag, getSortParamsByRequiredFlag, getSupportedVendorExtensions, getSymbolName, getTemplatingEngine, getterAndSetterCapitalize, getTypeDeclaration, getUseInlineModelResolver, getUseOneOfInterfaces, getUseOpenAPINormalizer, getVersionMetadataFilename, handleConstantParams, handleMethodResponse, handleMethodResponse, handleSpecialCharacters, hasBodyParameter, hasFormParameter, importMapping, initializeSpecialCharacterMapping, inlineSchemaNameMapping, inlineSchemaOption, instantiationTypes, isDataTypeBinary, isDataTypeFile, isEnableMinimalUpdate, isEnablePostProcessFile, isHideGenerationTimestamp, isJsonMimeType, isJsonVendorMimeType, isLibrary, isParameterNameUnique, isPropertyInnerMostEnum, isRemoveEnumValuePrefix, isRemoveOperationIdPrefix, isSkipOperationExample, isSkipOverwrite, isStrictSpecBehavior, isXmlMimeType, languageSpecificPrimitives, lowerCamelCase, modelDocTemplateFiles, modelFilename, modelFilename, modelNameMapping, modelPackage, modelTemplateFiles, modelTestTemplateFiles, modifyFeatureSet, nameMapping, openapiGeneratorIgnoreList, openapiNormalizer, operationIdNameMapping, outputFolder, parameterNameMapping, postProcess, postProcessEnumVars, postProcessModelProperty, postProcessModelsEnum, postProcessParameter, postProcessResponseWithProperty, postProcessSupportingFileData, postProcessWebhooksWithModels, processCompiler, processOpenAPI, processTemplatingEngine, processTestExampleData, removeImport, removeNonNameElementToCamelCase, removeNonNameElementToCamelCase, removeOption, removeSelfReferenceImports, reservedWords, reservedWordsMappings, sanitizeName, sanitizeName, sanitizeName, schemaMapping, serverVariableOverrides, setAddProps, setAllowUnicodeIdentifiers, setApiNamePrefix, setApiNameSuffix, setAutosetConstants, setCircularReferences, setDisallowAdditionalPropertiesIfNotPresent, setDocExtension, setEnableMinimalUpdate, setEnablePostProcessFile, setEnsureUniqueParams, setEnumUnknownDefaultCase, setFilesMetadataFilename, setGitHost, setGitRepoId, setGitUserId, setHideGenerationTimestamp, setHttpUserAgent, setIgnoreFilePathOverride, setInputSpec, setLegacyDiscriminatorBehavior, setLibrary, setModelNamePrefix, setModelNameSuffix, setNonArrayMapProperty, setOpenAPI, setOutputDir, setParameterBooleanFlagWithCodegenProperty, setParameterEncodingValues, setParameterExamples, setParameterExampleValue, 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, toApiDocFilename, toApiFilename, toApiImport, toArrayModelParamName, toBooleanGetter, toDefaultParameterValue, toDefaultValue, toDefaultValueWithParam, toEnumDefaultValue, toExamples, toExampleValue, toGetter, toInstantiationType, toMediaTypeSchemaName, toModelDocFilename, toModelImportMap, 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, apiFilename, apiPackage, apiTemplateFiles, apiTestTemplateFiles, cliOptions, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generatorLanguageVersion, getAddSuffixToDuplicateOperationNicknames, getDocExtension, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHttpUserAgent, getIgnoreFilePathOverride, getInputSpec, getLibrary, getOpenAPIGeneratorIgnoreList, getOutputDir, getReleaseNote, getSupportedVendorExtensions, 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, operationIdNameMapping, outputFolder, parameterNameMapping, postProcess, postProcessModelProperty, postProcessParameter, postProcessResponseWithProperty, postProcessSupportingFileData, postProcessWebhooksWithModels, processCompiler, processOpenAPI, processTemplatingEngine, reservedWords, reservedWordsMappings, sanitizeName, 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, templateOutputDirs, testPackage, toApiDocFilename, toApiFilename, toApiImport, toBooleanGetter, toGetter, toModelDocFilename, toModelImportMap, toSetter, typeMapping, unaliasSchema, updateAllModels, vendorExtensions
-
Field Details
-
OPT_CONTROLLER_PACKAGE
- See Also:
-
OPT_GENERATE_CONTROLLER_FROM_EXAMPLES
- See Also:
-
OPT_GENERATE_IMPLEMENTATION_FILES
- See Also:
-
OPT_GENERATE_OPERATIONS_TO_RETURN_NOT_IMPLEMENTED
- See Also:
-
OPT_GENERATE_STREAMING_FILE_UPLOAD
- See Also:
-
OPT_AOT
- See Also:
-
EXTENSION_ROLES
- See Also:
-
ANONYMOUS_ROLE_KEY
- See Also:
-
ANONYMOUS_ROLE
- See Also:
-
AUTHORIZED_ROLE_KEY
- See Also:
-
AUTHORIZED_ROLE
- See Also:
-
DENY_ALL_ROLE_KEY
- See Also:
-
DENY_ALL_ROLE
- See Also:
-
NAME
- See Also:
-
CONTROLLER_PREFIX
- See Also:
-
CONTROLLER_SUFFIX
- See Also:
-
API_PREFIX
- See Also:
-
API_SUFFIX
- See Also:
-
apiPackage
-
controllerPackage
-
generateImplementationFiles
protected boolean generateImplementationFiles -
generateOperationsToReturnNotImplemented
protected boolean generateOperationsToReturnNotImplemented -
generateControllerFromExamples
protected boolean generateControllerFromExamples -
useAuth
protected boolean useAuth -
generateStreamingFileUpload
protected boolean generateStreamingFileUpload -
aot
protected boolean aot
-
-
Method Details
-
getTag
public org.openapitools.codegen.CodegenType getTag()- Specified by:
getTag
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
getTag
in classorg.openapitools.codegen.DefaultCodegen
-
getName
- Specified by:
getName
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
getName
in classorg.openapitools.codegen.DefaultCodegen
-
getHelp
- Specified by:
getHelp
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
getHelp
in classorg.openapitools.codegen.DefaultCodegen
-
setControllerPackage
-
setGenerateImplementationFiles
public void setGenerateImplementationFiles(boolean generateImplementationFiles) -
setGenerateOperationsToReturnNotImplemented
public void setGenerateOperationsToReturnNotImplemented(boolean generateOperationsToReturnNotImplemented) -
setGenerateControllerFromExamples
public void setGenerateControllerFromExamples(boolean generateControllerFromExamples) -
setUseAuth
public void setUseAuth(boolean useAuth) -
processOpts
public void processOpts()- Specified by:
processOpts
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
processOpts
in classAbstractMicronautKotlinCodegen<KotlinMicronautServerOptionsBuilder>
-
isServer
public boolean isServer()- Specified by:
isServer
in classAbstractMicronautKotlinCodegen<KotlinMicronautServerOptionsBuilder>
-
apiTestFileFolder
- Specified by:
apiTestFileFolder
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
apiTestFileFolder
in classAbstractMicronautKotlinCodegen<KotlinMicronautServerOptionsBuilder>
-
apiTestFilename
- Specified by:
apiTestFilename
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
apiTestFilename
in classorg.openapitools.codegen.DefaultCodegen
-
setParameterExampleValue
public void setParameterExampleValue(org.openapitools.codegen.CodegenParameter p) - Overrides:
setParameterExampleValue
in classAbstractMicronautKotlinCodegen<KotlinMicronautServerOptionsBuilder>
-
postProcessOperationsWithModels
public org.openapitools.codegen.model.OperationsMap postProcessOperationsWithModels(org.openapitools.codegen.model.OperationsMap objs, List<org.openapitools.codegen.model.ModelMap> allModels) - Specified by:
postProcessOperationsWithModels
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
postProcessOperationsWithModels
in classAbstractMicronautKotlinCodegen<KotlinMicronautServerOptionsBuilder>
-
optionsBuilder
-