Class AbstractMicronautKotlinCodegen<T extends GeneratorOptionsBuilder>

java.lang.Object
org.openapitools.codegen.DefaultCodegen
org.openapitools.codegen.languages.AbstractKotlinCodegen
io.micronaut.openapi.generator.AbstractMicronautKotlinCodegen<T>
Type Parameters:
T - The generator options builder.
All Implemented Interfaces:
MicronautCodeGenerator<T>, org.openapitools.codegen.CodegenConfig, org.openapitools.codegen.languages.features.BeanValidationFeatures
Direct Known Subclasses:
KotlinMicronautClientCodegen, KotlinMicronautServerCodegen

public abstract class AbstractMicronautKotlinCodegen<T extends GeneratorOptionsBuilder> extends org.openapitools.codegen.languages.AbstractKotlinCodegen implements org.openapitools.codegen.languages.features.BeanValidationFeatures, MicronautCodeGenerator<T>
Base generator for Micronaut.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.openapitools.codegen.languages.AbstractKotlinCodegen

    org.openapitools.codegen.languages.AbstractKotlinCodegen.DataTypeAssigner
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map<String,org.openapitools.codegen.CodegenModel>
     
    protected String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    protected String
     
    protected boolean
     
    protected boolean
     
    protected boolean
     
    protected boolean
     
    protected boolean
     
    protected String
     
    protected boolean
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
     
    protected boolean
     
    protected SecureRandom
     
    protected boolean
     
    protected boolean
     
     
    protected String
     
    protected String
     
    protected String
     
    protected boolean
     
    protected boolean
     

    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, 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, 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
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addEnumNameMapping(Map<String,String> enumNameMapping)
     
    void
     
    void
    addInlineSchemaNameMapping(Map<String,String> inlineSchemaNameMapping)
     
    void
    addInlineSchemaOption(Map<String,String> inlineSchemaOption)
     
    void
    addModelNameMapping(Map<String,String> modelNameMapping)
     
    protected com.google.common.collect.ImmutableMap.Builder<String,com.samskivert.mustache.Mustache.Lambda>
     
    void
     
    void
    addOpenapiNormalizer(Map<String,String> openapiNormalizer)
     
    void
    addOperationToGroup(String tag, String resourcePath, io.swagger.v3.oas.models.Operation operation, org.openapitools.codegen.CodegenOperation co, Map<String,List<org.openapitools.codegen.CodegenOperation>> operations)
     
    void
     
    void
     
    void
     
    void
     
     
    org.openapitools.codegen.CodegenModel
    fromModel(String name, io.swagger.v3.oas.models.media.Schema model)
     
    org.openapitools.codegen.CodegenOperation
    fromOperation(String path, String httpMethod, io.swagger.v3.oas.models.Operation operation, List<io.swagger.v3.oas.models.servers.Server> servers)
     
    org.openapitools.codegen.CodegenParameter
    fromParameter(io.swagger.v3.oas.models.parameters.Parameter p, Set<String> imports)
     
    org.openapitools.codegen.CodegenProperty
    fromProperty(String name, io.swagger.v3.oas.models.media.Schema p, boolean required, boolean schemaIsFromAdditionalProperties)
     
    getExampleValue(String defaultValue, String example, String dataType, Boolean isModel, List<Object> allowableValues, String itemsType, String itemsExample, List<org.openapitools.codegen.CodegenProperty> requiredVars, boolean isProperty)
     
     
    protected String
    getParameterExampleValue(org.openapitools.codegen.CodegenParameter p)
     
    protected String
    getPropertyExampleValue(org.openapitools.codegen.CodegenProperty p)
     
    getTypeDeclaration(io.swagger.v3.oas.models.media.Schema p)
    Output the type declaration of the property.
    static boolean
     
    abstract boolean
     
    boolean
     
     
    Map<String,org.openapitools.codegen.model.ModelsMap>
    postProcessAllModels(Map<String,org.openapitools.codegen.model.ModelsMap> objs)
     
    org.openapitools.codegen.model.OperationsMap
    postProcessOperationsWithModels(org.openapitools.codegen.model.OperationsMap objs, List<org.openapitools.codegen.model.ModelMap> allModels)
     
    void
    preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
     
    void
     
     
    void
    setApiPackage(String apiPackage)
     
    void
    setArtifactId(String artifactId)
     
    void
     
    void
    setFluxForArrays(boolean fluxForArrays)
     
    void
    setGeneratedAnnotation(boolean generatedAnnotation)
     
    void
    setGenerateHttpResponseAlways(boolean generateHttpResponseAlways)
     
    void
    setGenerateHttpResponseWhereRequired(boolean generateHttpResponseWhereRequired)
     
    void
     
    void
    setKsp(boolean ksp)
     
    void
    setModelPackage(String modelPackage)
     
    void
    setParameterExampleValue(org.openapitools.codegen.CodegenParameter p)
     
    void
    setParameterExampleValue(org.openapitools.codegen.CodegenParameter codegenParameter, io.swagger.v3.oas.models.parameters.Parameter parameter)
     
    void
    setPlural(boolean plural)
     
    void
    setReactive(boolean reactive)
     
    void
    setSerializationLibrary(String serializationLibrary)
     
    void
    setTestTool(String testTool)
     
    void
    setUseBeanValidation(boolean useBeanValidation)
     
    void
    setVisitable(boolean visitable)
     
     
     
     
    toEnumValue(String value, String datatype)
     
    toEnumVarName(String value, String datatype)
     
     
     
     

    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, apiTestFilename, 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, 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, getSupportedVendorExtensions, getSymbolName, getTag, 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, apiTestFilename, apiTestTemplateFiles, cliOptions, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generatorLanguageVersion, getAddSuffixToDuplicateOperationNicknames, getDocExtension, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHelp, getHttpUserAgent, getIgnoreFilePathOverride, getInputSpec, getLibrary, getName, getOpenAPIGeneratorIgnoreList, getOutputDir, getReleaseNote, getSupportedVendorExtensions, 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, 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

    Methods inherited from interface io.micronaut.openapi.generator.MicronautCodeGenerator

    optionsBuilder
  • Field Details

    • OPT_TITLE

      public static final String OPT_TITLE
      See Also:
    • OPT_TEST

      public static final String OPT_TEST
      See Also:
    • OPT_TEST_JUNIT

      public static final String OPT_TEST_JUNIT
      See Also:
    • OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR

      public static final String OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR
      See Also:
    • OPT_USE_AUTH

      public static final String OPT_USE_AUTH
      See Also:
    • OPT_USE_PLURAL

      public static final String OPT_USE_PLURAL
      See Also:
    • OPT_FLUX_FOR_ARRAYS

      public static final String OPT_FLUX_FOR_ARRAYS
      See Also:
    • OPT_GENERATED_ANNOTATION

      public static final String OPT_GENERATED_ANNOTATION
      See Also:
    • OPT_VISITABLE

      public static final String OPT_VISITABLE
      See Also:
    • OPT_DATE_LIBRARY_ZONED_DATETIME

      public static final String OPT_DATE_LIBRARY_ZONED_DATETIME
      See Also:
    • OPT_DATE_LIBRARY_OFFSET_DATETIME

      public static final String OPT_DATE_LIBRARY_OFFSET_DATETIME
      See Also:
    • OPT_DATE_LIBRARY_LOCAL_DATETIME

      public static final String OPT_DATE_LIBRARY_LOCAL_DATETIME
      See Also:
    • OPT_DATE_FORMAT

      public static final String OPT_DATE_FORMAT
      See Also:
    • OPT_DATETIME_FORMAT

      public static final String OPT_DATETIME_FORMAT
      See Also:
    • OPT_REACTIVE

      public static final String OPT_REACTIVE
      See Also:
    • OPT_GENERATE_HTTP_RESPONSE_ALWAYS

      public static final String OPT_GENERATE_HTTP_RESPONSE_ALWAYS
      See Also:
    • OPT_GENERATE_HTTP_RESPONSE_WHERE_REQUIRED

      public static final String OPT_GENERATE_HTTP_RESPONSE_WHERE_REQUIRED
      See Also:
    • OPT_APPLICATION_NAME

      public static final String OPT_APPLICATION_NAME
      See Also:
    • OPT_GENERATE_SWAGGER_ANNOTATIONS

      public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS
      See Also:
    • OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2

      public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2
      See Also:
    • OPT_GENERATE_SWAGGER_ANNOTATIONS_TRUE

      public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS_TRUE
      See Also:
    • OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE

      public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE
      See Also:
    • OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG

      public static final String OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG
      See Also:
    • OPT_KSP

      public static final String OPT_KSP
      See Also:
    • CONTENT_TYPE_APPLICATION_FORM_URLENCODED

      public static final String CONTENT_TYPE_APPLICATION_FORM_URLENCODED
      See Also:
    • CONTENT_TYPE_APPLICATION_JSON

      public static final String CONTENT_TYPE_APPLICATION_JSON
      See Also:
    • CONTENT_TYPE_MULTIPART_FORM_DATA

      public static final String CONTENT_TYPE_MULTIPART_FORM_DATA
      See Also:
    • CONTENT_TYPE_ANY

      public static final String CONTENT_TYPE_ANY
      See Also:
    • random

      protected SecureRandom random
    • dateLibrary

      protected String dateLibrary
    • title

      protected String title
    • useBeanValidation

      protected boolean useBeanValidation
    • visitable

      protected boolean visitable
    • plural

      protected boolean plural
    • fluxForArrays

      protected boolean fluxForArrays
    • generatedAnnotation

      protected boolean generatedAnnotation
    • testTool

      protected String testTool
    • requiredPropertiesInConstructor

      protected boolean requiredPropertiesInConstructor
    • reactive

      protected boolean reactive
    • generateHttpResponseAlways

      protected boolean generateHttpResponseAlways
    • generateHttpResponseWhereRequired

      protected boolean generateHttpResponseWhereRequired
    • ksp

      protected boolean ksp
    • appName

      protected String appName
    • generateSwaggerAnnotations

      protected String generateSwaggerAnnotations
    • generateOperationOnlyForFirstTag

      protected boolean generateOperationOnlyForFirstTag
    • serializationLibrary

      protected String serializationLibrary
    • parameterMappings

      protected List<ParameterMapping> parameterMappings
    • responseBodyMappings

      protected List<ResponseBodyMapping> responseBodyMappings
    • allModels

      protected Map<String,org.openapitools.codegen.CodegenModel> allModels
  • Constructor Details

    • AbstractMicronautKotlinCodegen

      protected AbstractMicronautKotlinCodegen()
  • Method Details

    • setGenerateHttpResponseAlways

      public void setGenerateHttpResponseAlways(boolean generateHttpResponseAlways)
    • setGenerateHttpResponseWhereRequired

      public void setGenerateHttpResponseWhereRequired(boolean generateHttpResponseWhereRequired)
    • setReactive

      public void setReactive(boolean reactive)
    • setTestTool

      public void setTestTool(String testTool)
    • setArtifactId

      public void setArtifactId(String artifactId)
      Overrides:
      setArtifactId in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • setModelPackage

      public void setModelPackage(String modelPackage)
      Overrides:
      setModelPackage in class org.openapitools.codegen.DefaultCodegen
    • setApiPackage

      public void setApiPackage(String apiPackage)
      Overrides:
      setApiPackage in class org.openapitools.codegen.DefaultCodegen
    • setInvokerPackage

      public void setInvokerPackage(String packageName)
    • setPlural

      public void setPlural(boolean plural)
    • setFluxForArrays

      public void setFluxForArrays(boolean fluxForArrays)
    • setGeneratedAnnotation

      public void setGeneratedAnnotation(boolean generatedAnnotation)
    • setKsp

      public void setKsp(boolean ksp)
    • processOpts

      public void processOpts()
      Specified by:
      processOpts in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      processOpts in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • addParameterMappings

      public void addParameterMappings(List<ParameterMapping> parameterMappings)
    • addResponseBodyMappings

      public void addResponseBodyMappings(List<ResponseBodyMapping> responseBodyMappings)
    • addSchemaMapping

      public void addSchemaMapping(Map<String,String> schemaMapping)
    • addImportMapping

      public void addImportMapping(Map<String,String> importMapping)
    • addNameMapping

      public void addNameMapping(Map<String,String> nameMapping)
    • addTypeMapping

      public void addTypeMapping(Map<String,String> typeMapping)
    • addEnumNameMapping

      public void addEnumNameMapping(Map<String,String> enumNameMapping)
    • addModelNameMapping

      public void addModelNameMapping(Map<String,String> modelNameMapping)
    • addInlineSchemaNameMapping

      public void addInlineSchemaNameMapping(Map<String,String> inlineSchemaNameMapping)
    • addInlineSchemaOption

      public void addInlineSchemaOption(Map<String,String> inlineSchemaOption)
    • addOpenapiNormalizer

      public void addOpenapiNormalizer(Map<String,String> openapiNormalizer)
    • testFileFolder

      public String testFileFolder()
    • isServer

      public abstract boolean isServer()
    • apiTestFileFolder

      public String apiTestFileFolder()
      Specified by:
      apiTestFileFolder in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      apiTestFileFolder in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • modelTestFileFolder

      public String modelTestFileFolder()
      Specified by:
      modelTestFileFolder in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      modelTestFileFolder in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • toApiTestFilename

      public String toApiTestFilename(String name)
      Specified by:
      toApiTestFilename in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      toApiTestFilename in class org.openapitools.codegen.DefaultCodegen
    • toModelTestFilename

      public String toModelTestFilename(String name)
      Specified by:
      toModelTestFilename in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      toModelTestFilename in class org.openapitools.codegen.DefaultCodegen
    • setUseBeanValidation

      public void setUseBeanValidation(boolean useBeanValidation)
      Specified by:
      setUseBeanValidation in interface org.openapitools.codegen.languages.features.BeanValidationFeatures
    • setVisitable

      public void setVisitable(boolean visitable)
    • toApiVarName

      public String toApiVarName(String name)
      Specified by:
      toApiVarName in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      toApiVarName in class org.openapitools.codegen.DefaultCodegen
    • isVisitable

      public boolean isVisitable()
    • sanitizeTag

      public String sanitizeTag(String tag)
      Specified by:
      sanitizeTag in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      sanitizeTag in class org.openapitools.codegen.DefaultCodegen
    • addOperationToGroup

      public void addOperationToGroup(String tag, String resourcePath, io.swagger.v3.oas.models.Operation operation, org.openapitools.codegen.CodegenOperation co, Map<String,List<org.openapitools.codegen.CodegenOperation>> operations)
      Specified by:
      addOperationToGroup in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      addOperationToGroup in class org.openapitools.codegen.DefaultCodegen
    • preprocessOpenAPI

      public void preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
      Specified by:
      preprocessOpenAPI in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      preprocessOpenAPI in class org.openapitools.codegen.DefaultCodegen
    • 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 interface org.openapitools.codegen.CodegenConfig
      Overrides:
      postProcessOperationsWithModels in class org.openapitools.codegen.DefaultCodegen
    • toEnumValue

      public String toEnumValue(String value, String datatype)
      Overrides:
      toEnumValue in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • fromModel

      public org.openapitools.codegen.CodegenModel fromModel(String name, io.swagger.v3.oas.models.media.Schema model)
      Specified by:
      fromModel in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      fromModel in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • getTypeDeclaration

      public String getTypeDeclaration(io.swagger.v3.oas.models.media.Schema p)
      Output the type declaration of the property.
      Specified by:
      getTypeDeclaration in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      getTypeDeclaration in class org.openapitools.codegen.languages.AbstractKotlinCodegen
      Parameters:
      p - OpenAPI Property object
      Returns:
      a string presentation of the property type
    • toModelName

      public String toModelName(String name)
      Specified by:
      toModelName in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      toModelName in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • fromParameter

      public org.openapitools.codegen.CodegenParameter fromParameter(io.swagger.v3.oas.models.parameters.Parameter p, Set<String> imports)
      Overrides:
      fromParameter in class org.openapitools.codegen.DefaultCodegen
    • fromProperty

      public org.openapitools.codegen.CodegenProperty fromProperty(String name, io.swagger.v3.oas.models.media.Schema p, boolean required, boolean schemaIsFromAdditionalProperties)
      Overrides:
      fromProperty in class org.openapitools.codegen.DefaultCodegen
    • fromOperation

      public org.openapitools.codegen.CodegenOperation fromOperation(String path, String httpMethod, io.swagger.v3.oas.models.Operation operation, List<io.swagger.v3.oas.models.servers.Server> servers)
      Specified by:
      fromOperation in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      fromOperation in class org.openapitools.codegen.DefaultCodegen
    • toEnumVarName

      public String toEnumVarName(String value, String datatype)
      Overrides:
      toEnumVarName in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • isNumeric

      public static boolean isNumeric(String str)
    • toVarName

      public String toVarName(String name)
      Overrides:
      toVarName in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • postProcessAllModels

      public Map<String,org.openapitools.codegen.model.ModelsMap> postProcessAllModels(Map<String,org.openapitools.codegen.model.ModelsMap> objs)
      Specified by:
      postProcessAllModels in interface org.openapitools.codegen.CodegenConfig
      Overrides:
      postProcessAllModels in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • setParameterExampleValue

      public void setParameterExampleValue(org.openapitools.codegen.CodegenParameter codegenParameter, io.swagger.v3.oas.models.parameters.Parameter parameter)
      Overrides:
      setParameterExampleValue in class org.openapitools.codegen.DefaultCodegen
    • setParameterExampleValue

      public void setParameterExampleValue(org.openapitools.codegen.CodegenParameter p)
      Overrides:
      setParameterExampleValue in class org.openapitools.codegen.DefaultCodegen
    • getParameterExampleValue

      protected String getParameterExampleValue(org.openapitools.codegen.CodegenParameter p)
    • getPropertyExampleValue

      protected String getPropertyExampleValue(org.openapitools.codegen.CodegenProperty p)
    • getExampleValue

      public String getExampleValue(String defaultValue, String example, String dataType, Boolean isModel, List<Object> allowableValues, String itemsType, String itemsExample, List<org.openapitools.codegen.CodegenProperty> requiredVars, boolean isProperty)
    • addMustacheLambdas

      protected com.google.common.collect.ImmutableMap.Builder<String,com.samskivert.mustache.Mustache.Lambda> addMustacheLambdas()
      Overrides:
      addMustacheLambdas in class org.openapitools.codegen.languages.AbstractKotlinCodegen
    • getPackageName

      public String getPackageName()
    • setSerializationLibrary

      public void setSerializationLibrary(String serializationLibrary)
    • setDateTimeLibrary

      public void setDateTimeLibrary(String name)