Package io.micronaut.openapi.generator
Class AbstractMicronautJavaCodegen<T extends GeneratorOptionsBuilder>
java.lang.Object
org.openapitools.codegen.DefaultCodegen
org.openapitools.codegen.languages.AbstractJavaCodegen
io.micronaut.openapi.generator.AbstractMicronautJavaCodegen<T>
- Type Parameters:
T
- The generator options builder.
- All Implemented Interfaces:
MicronautCodeGenerator<T>
,org.openapitools.codegen.CodegenConfig
,org.openapitools.codegen.languages.features.BeanValidationFeatures
,org.openapitools.codegen.languages.features.DocumentationProviderFeatures
,org.openapitools.codegen.languages.features.OptionalFeatures
- Direct Known Subclasses:
JavaMicronautClientCodegen
,JavaMicronautServerCodegen
public abstract class AbstractMicronautJavaCodegen<T extends GeneratorOptionsBuilder>
extends org.openapitools.codegen.languages.AbstractJavaCodegen
implements org.openapitools.codegen.languages.features.BeanValidationFeatures, org.openapitools.codegen.languages.features.OptionalFeatures, MicronautCodeGenerator<T>
Base generator for Micronaut.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openapitools.codegen.languages.features.DocumentationProviderFeatures
org.openapitools.codegen.languages.features.DocumentationProviderFeatures.AnnotationLibrary, org.openapitools.codegen.languages.features.DocumentationProviderFeatures.DocumentationProvider
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
static final String
static final String
static final String
static final 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
static final String
static final String
protected List<ParameterMapping>
protected boolean
protected SecureRandom
protected boolean
protected boolean
protected List<ResponseBodyMapping>
protected String
protected String
protected String
protected boolean
protected boolean
Fields inherited from class org.openapitools.codegen.languages.AbstractJavaCodegen
ADDITIONAL_ENUM_TYPE_ANNOTATIONS, ADDITIONAL_MODEL_TYPE_ANNOTATIONS, ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS, additionalEnumTypeAnnotations, additionalModelTypeAnnotations, additionalOneOfTypeAnnotations, annotationLibrary, apiDocPath, artifactDescription, artifactId, artifactUrl, artifactVersion, BOOLEAN_GETTER_PREFIX, booleanGetterPrefix, CAMEL_CASE_DOLLAR_SIGN, camelCaseDollarSign, CONTAINER_DEFAULT_TO_NULL, containerDefaultToNull, DATE_LIBRARY, dateLibrary, DEFAULT_LIBRARY, DEFAULT_TEST_FOLDER, developerEmail, developerName, developerOrganization, developerOrganizationUrl, DISABLE_HTML_ESCAPING, disableHtmlEscaping, DISCRIMINATOR_CASE_SENSITIVE, discriminatorCaseSensitive, documentationProvider, GENERATE_BUILDERS, GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, generateBuilders, generateConstructorWithAllArgs, groupId, IGNORE_ANYOF_IN_ENUM, ignoreAnyOfInEnum, IMPLICIT_HEADERS, IMPLICIT_HEADERS_REGEX, implicitHeaders, implicitHeadersRegex, invokerPackage, jackson, JACKSON, JAVAX_PACKAGE, licenseName, licenseUrl, LOMBOK, lombokAnnotations, modelDocPath, OPENAPI_NULLABLE, openApiNullable, outputTestFolder, parentArtifactId, parentGroupId, parentOverridden, parentVersion, projectFolder, projectTestFolder, scmConnection, scmDeveloperConnection, scmUrl, serializableModel, serializeBigDecimalAsString, sourceFolder, SUPPORT_ASYNC, supportAsync, TEST_OUTPUT, testFolder, USE_JAKARTA_EE, USE_ONE_OF_INTERFACES, useBeanValidation, useJakartaEe, WITH_XML, withXml
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
Fields inherited from interface org.openapitools.codegen.languages.features.DocumentationProviderFeatures
ANNOTATION_LIBRARY, DOCUMENTATION_PROVIDER
Fields inherited from interface org.openapitools.codegen.languages.features.OptionalFeatures
USE_OPTIONAL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEnumNameMapping
(Map<String, String> enumNameMapping) void
addImportMapping
(Map<String, String> importMapping) 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
addNameMapping
(Map<String, String> nameMapping) 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
addParameterMappings
(List<ParameterMapping> parameterMappings) void
addResponseBodyMappings
(List<ResponseBodyMapping> responseBodyMappings) void
addSchemaMapping
(Map<String, String> schemaMapping) void
addTypeMapping
(Map<String, String> typeMapping) arrayDefaultValue
(String itemsDatatypeWithEnum, String itemsDataType, boolean itemsIsEnumOrRef, boolean isArray, boolean itemsIsString, boolean itemsIsNumeric, boolean itemsIsFloat, boolean itemsIsMap, io.swagger.v3.oas.models.media.Schema schema) protected org.openapitools.codegen.CodegenDiscriminator
createDiscriminator
(String schemaName, io.swagger.v3.oas.models.media.Schema schema) escapeTextGroovy
(String text) org.openapitools.codegen.CodegenModel
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 groovy, boolean isProperty) protected String
getParameterExampleValue
(org.openapitools.codegen.CodegenParameter p, boolean groovy) protected String
getPropertyExampleValue
(org.openapitools.codegen.CodegenProperty p, boolean groovy) boolean
boolean
protected boolean
isReservedWord
(String word) abstract boolean
isServer()
boolean
void
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
sanitizeTag
(String tag) void
setApiNamePrefix
(String apiNamePrefix) void
setApiNameSuffix
(String apiNameSuffix) void
setApiPackage
(String apiPackage) void
setArtifactId
(String artifactId) void
setDateTimeLibrary
(String name) void
setFluxForArrays
(boolean fluxForArrays) void
setGeneratedAnnotation
(boolean generatedAnnotation) void
setGenerateHttpResponseAlways
(boolean generateHttpResponseAlways) void
setGenerateHttpResponseWhereRequired
(boolean generateHttpResponseWhereRequired) void
setInvokerPackage
(String invokerPackage) void
setLombok
(boolean lombok) void
setModelNamePrefix
(String modelNamePrefix) void
setModelNameSuffix
(String modelNameSuffix) void
setModelPackage
(String modelPackage) void
setParameterExampleValue
(org.openapitools.codegen.CodegenParameter p) void
setPlural
(boolean plural) void
setReactive
(boolean reactive) void
setSerializationLibrary
(String serializationLibrary) void
setTestTool
(String testTool) void
setUseBeanValidation
(boolean useBeanValidation) void
setUseOptional
(boolean useOptional) void
setVisitable
(boolean visitable) toApiTestFilename
(String name) toApiVarName
(String name) toDefaultValue
(org.openapitools.codegen.CodegenProperty cp, io.swagger.v3.oas.models.media.Schema schema) toEnumValue
(String value, String datatype) toEnumVarName
(String value, String datatype) toModelTestFilename
(String name) Methods inherited from class org.openapitools.codegen.languages.AbstractJavaCodegen
addAdditionPropertiesToCodeGenModel, addImports, addImportsToOneOfInterface, apiDocFileFolder, apiFileFolder, applyJakartaPackage, applyJavaxPackage, escapeQuotationMark, escapeReservedWord, escapeUnsafeCharacters, findByName, getAdditionalModelTypeAnnotations, getAdditionalOneOfTypeAnnotations, getAnnotationLibrary, getArtifactDescription, getArtifactId, getArtifactUrl, getArtifactVersion, getBooleanGetterPrefix, getDateLibrary, getDeveloperEmail, getDeveloperName, getDeveloperOrganization, getDeveloperOrganizationUrl, getDocumentationProvider, getGroupId, getInvokerPackage, getLicenseName, getLicenseUrl, getOutputTestFolder, getSchemaType, getScmConnection, getScmDeveloperConnection, getScmUrl, getSerializableModel, getSourceFolder, getSupportedVendorExtensions, getTestFolder, getTypeDeclaration, handleImplicitHeaders, isAddNullableImports, isConstructorWithAllArgsAllowed, isGenerateBuilders, isGenerateConstructorWithAllArgs, isJackson, isOpenApiNullable, isTypeErasedGenerics, isUseBeanValidation, modelDocFileFolder, modelFileFolder, needToImport, postProcessFile, postProcessModelProperty, postProcessModels, postProcessResponseWithProperty, setAdditionalEnumTypeAnnotations, setAdditionalModelTypeAnnotations, setAdditionalOneOfTypeAnnotations, setAnnotationLibrary, setArtifactDescription, setArtifactUrl, setArtifactVersion, setBooleanGetterPrefix, setCamelCaseDollarSign, setContainerDefaultToNull, setDateLibrary, setDeveloperEmail, setDeveloperName, setDeveloperOrganization, setDeveloperOrganizationUrl, setDisableHtmlEscaping, setDiscriminatorCaseSensitive, setDocumentationProvider, setGenerateBuilders, setGenerateConstructorWithAllArgs, setGroupId, setIgnoreAnyOfInEnum, setImplicitHeaders, setImplicitHeadersRegex, setJackson, setLicenseName, setLicenseUrl, setOpenApiNullable, setOutputDir, setOutputTestFolder, setParameterExampleValue, setParameterExampleValue, setParentArtifactId, setParentGroupId, setParentOverridden, setParentVersion, setScmConnection, setScmDeveloperConnection, setScmUrl, setSerializableModel, setSerializeBigDecimalAsString, setSourceFolder, setSupportAsync, setTestFolder, setUseJakartaEe, setWithXml, toApiDocFilename, toApiFilename, toArrayDefaultValue, toBooleanGetter, toDefaultParameterValue, toEnumName, toExampleValue, toModelDocFilename, toModelFilename, toModelName, toOperationId, toParamName, toRegularExpression
Methods inherited from class org.openapitools.codegen.DefaultCodegen
addBodyModelSchema, addHeaders, addImport, addImport, addImport, addImports, addImports, addImports, addImportsForPropertyType, 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, convertPropertyToBooleanAndWriteBack, convertPropertyToStringAndWriteBack, convertPropertyToTypeAndWriteBack, defaultIncludes, defaultTemplatingEngine, embeddedTemplateDir, encodePath, enumNameMapping, escapeText, escapeTextWhileAllowingNewLines, fileSuffix, findCommonPrefixOfVars, findMethodResponse, fromCallback, fromFormProperty, fromProperty, fromProperty, fromRequestBody, fromRequestBodyToFormParameters, fromResponse, fromSecurity, fromServers, fromServerVariables, generateExamplePath, generateJSONSpecFile, generateYAMLSpecFile, generatorLanguage, 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, getSingleSchemaType, getSortModelPropertiesByRequiredFlag, getSortParamsByRequiredFlag, getSymbolName, getTag, getTemplatingEngine, getTypeDeclaration, getUseOneOfInterfaces, getUseOpenapiNormalizer, getVersionMetadataFilename, handleConstantParams, handleMethodResponse, handleMethodResponse, handleSpecialCharacters, hasBodyParameter, hasFormParameter, importMapping, initializeSpecialCharacterMapping, inlineSchemaNameMapping, inlineSchemaOption, instantiationTypes, isDataTypeBinary, isDataTypeFile, isDataTypeString, 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, postProcessEnumVars, postProcessModelsEnum, postProcessParameter, postProcessSupportingFileData, postProcessWebhooksWithModels, processCompiler, processOpenAPI, processTemplatingEngine, processTestExampleData, removeImport, removeNonNameElementToCamelCase, removeNonNameElementToCamelCase, removeOption, removeSelfReferenceImports, reservedWords, reservedWordsMappings, sanitizeName, sanitizeName, sanitizeName, schemaMapping, serverVariableOverrides, setAddProps, setAllowUnicodeIdentifiers, setAutosetConstants, setCircularReferences, setDisallowAdditionalPropertiesIfNotPresent, setDocExtension, setEnableMinimalUpdate, setEnablePostProcessFile, setEnsureUniqueParams, setEnumUnknownDefaultCase, setFilesMetadataFilename, setGitHost, setGitRepoId, setGitUserId, setHideGenerationTimestamp, setHttpUserAgent, setIgnoreFilePathOverride, setInputSpec, setLegacyDiscriminatorBehavior, setLibrary, setNonArrayMapProperty, setOpenAPI, setParameterBooleanFlagWithCodegenProperty, setParameterEncodingValues, setParameterExamples, setParameterNullable, setPrependFormOrBodyParameters, setReleaseNote, setRemoveEnumValuePrefix, setRemoveOperationIdPrefix, setRemoveOperationIdPrefixCount, setRemoveOperationIdPrefixDelimiter, setReservedWordsLowerCase, setSkipOperationExample, setSkipOverwrite, setSortModelPropertiesByRequiredFlag, setSortParamsByRequiredFlag, setStrictSpecBehavior, setTemplateDir, setTemplatingEngine, setUseOneOfInterfaces, setVersionMetadataFilename, shouldAddImport, shouldOverwrite, SortModelPropertiesByRequiredFlag, SortParametersByRequiredFlag, specVersionGreaterThanOrEqualTo310, supportedLibraries, supportingFiles, templateDir, templateOutputDirs, testPackage, toAllOfName, toAnyOfName, toApiImport, toArrayModelParamName, toDefaultParameterValue, toDefaultValue, toDefaultValueWithParam, toEnumDefaultValue, 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, useCodegenAsMustacheParentContext, 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, generatorLanguage, generatorLanguageVersion, getAddSuffixToDuplicateOperationNicknames, getDocExtension, getFeatureSet, getFilesMetadataFilename, getGeneratorMetadata, getGitHost, getGitRepoId, getGitUserId, getHelp, getHttpUserAgent, getIgnoreFilePathOverride, getInputSpec, getLibrary, getName, getOpenapiGeneratorIgnoreList, getOutputDir, getReleaseNote, getTag, getTemplatingEngine, getTypeDeclaration, 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, 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, toGetter, toModelImport, toModelImportMap, toSetter, typeMapping, unaliasSchema, updateAllModels, vendorExtensions
Methods inherited from interface org.openapitools.codegen.languages.features.DocumentationProviderFeatures
defaultDocumentationProvider, supportedAnnotationLibraries, supportedDocumentationProvider
Methods inherited from interface io.micronaut.openapi.generator.MicronautCodeGenerator
optionsBuilder
-
Field Details
-
OPT_TITLE
- See Also:
-
OPT_TEST
- See Also:
-
OPT_TEST_JUNIT
- See Also:
-
OPT_TEST_SPOCK
- See Also:
-
OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR
- See Also:
-
OPT_USE_AUTH
- See Also:
-
OPT_USE_LOMBOK
- See Also:
-
OPT_USE_PLURAL
- See Also:
-
OPT_FLUX_FOR_ARRAYS
- See Also:
-
OPT_GENERATED_ANNOTATION
- See Also:
-
OPT_VISITABLE
- See Also:
-
OPT_DATE_LIBRARY_ZONED_DATETIME
- See Also:
-
OPT_DATE_LIBRARY_OFFSET_DATETIME
- See Also:
-
OPT_DATE_LIBRARY_LOCAL_DATETIME
- See Also:
-
OPT_DATE_FORMAT
- See Also:
-
OPT_DATETIME_FORMAT
- See Also:
-
OPT_REACTIVE
- See Also:
-
OPT_GENERATE_HTTP_RESPONSE_ALWAYS
- See Also:
-
OPT_GENERATE_HTTP_RESPONSE_WHERE_REQUIRED
- See Also:
-
OPT_APPLICATION_NAME
- See Also:
-
OPT_GENERATE_SWAGGER_ANNOTATIONS
- See Also:
-
OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_1
- See Also:
-
OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2
- See Also:
-
OPT_GENERATE_SWAGGER_ANNOTATIONS_TRUE
- See Also:
-
OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE
- See Also:
-
OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG
- See Also:
-
CONTENT_TYPE_APPLICATION_FORM_URLENCODED
- See Also:
-
CONTENT_TYPE_APPLICATION_JSON
- See Also:
-
CONTENT_TYPE_MULTIPART_FORM_DATA
- See Also:
-
CONTENT_TYPE_ANY
- See Also:
-
random
-
title
-
useOptional
protected boolean useOptional -
visitable
protected boolean visitable -
lombok
protected boolean lombok -
fluxForArrays
protected boolean fluxForArrays -
plural
protected boolean plural -
generatedAnnotation
protected boolean generatedAnnotation -
testTool
-
requiredPropertiesInConstructor
protected boolean requiredPropertiesInConstructor -
reactive
protected boolean reactive -
generateHttpResponseAlways
protected boolean generateHttpResponseAlways -
generateHttpResponseWhereRequired
protected boolean generateHttpResponseWhereRequired -
appName
-
generateSwaggerAnnotations
-
generateOperationOnlyForFirstTag
protected boolean generateOperationOnlyForFirstTag -
serializationLibrary
-
parameterMappings
-
responseBodyMappings
-
allModels
-
-
Constructor Details
-
AbstractMicronautJavaCodegen
protected AbstractMicronautJavaCodegen()
-
-
Method Details
-
setGenerateHttpResponseAlways
public void setGenerateHttpResponseAlways(boolean generateHttpResponseAlways) -
setGenerateHttpResponseWhereRequired
public void setGenerateHttpResponseWhereRequired(boolean generateHttpResponseWhereRequired) -
setReactive
public void setReactive(boolean reactive) -
setTestTool
-
setArtifactId
- Overrides:
setArtifactId
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
setModelPackage
- Overrides:
setModelPackage
in classorg.openapitools.codegen.DefaultCodegen
-
setApiPackage
- Overrides:
setApiPackage
in classorg.openapitools.codegen.DefaultCodegen
-
setApiNamePrefix
- Overrides:
setApiNamePrefix
in classorg.openapitools.codegen.DefaultCodegen
-
setApiNameSuffix
- Overrides:
setApiNameSuffix
in classorg.openapitools.codegen.DefaultCodegen
-
setModelNamePrefix
- Overrides:
setModelNamePrefix
in classorg.openapitools.codegen.DefaultCodegen
-
setModelNameSuffix
- Overrides:
setModelNameSuffix
in classorg.openapitools.codegen.DefaultCodegen
-
setInvokerPackage
- Overrides:
setInvokerPackage
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
setLombok
public void setLombok(boolean lombok) -
setPlural
public void setPlural(boolean plural) -
setFluxForArrays
public void setFluxForArrays(boolean fluxForArrays) -
setGeneratedAnnotation
public void setGeneratedAnnotation(boolean generatedAnnotation) -
processOpts
public void processOpts()- Specified by:
processOpts
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
processOpts
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
addParameterMappings
-
addResponseBodyMappings
-
addSchemaMapping
-
addImportMapping
-
addNameMapping
-
addTypeMapping
-
addEnumNameMapping
-
addModelNameMapping
-
addInlineSchemaNameMapping
-
addInlineSchemaOption
-
addOpenapiNormalizer
-
testFileFolder
-
isServer
public abstract boolean isServer() -
apiTestFileFolder
- Specified by:
apiTestFileFolder
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
apiTestFileFolder
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
modelTestFileFolder
- Specified by:
modelTestFileFolder
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
modelTestFileFolder
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
toApiTestFilename
- Specified by:
toApiTestFilename
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
toApiTestFilename
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
toModelTestFilename
- Specified by:
toModelTestFilename
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
toModelTestFilename
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
fromParameter
public org.openapitools.codegen.CodegenParameter fromParameter(io.swagger.v3.oas.models.parameters.Parameter p, Set<String> imports) - Overrides:
fromParameter
in classorg.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 classorg.openapitools.codegen.DefaultCodegen
-
toEnumVarName
- Overrides:
toEnumVarName
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
toDefaultValue
public String toDefaultValue(org.openapitools.codegen.CodegenProperty cp, io.swagger.v3.oas.models.media.Schema schema) - Overrides:
toDefaultValue
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
arrayDefaultValue
public org.apache.commons.lang3.tuple.Pair<String,String> arrayDefaultValue(String itemsDatatypeWithEnum, String itemsDataType, boolean itemsIsEnumOrRef, boolean isArray, boolean itemsIsString, boolean itemsIsNumeric, boolean itemsIsFloat, boolean itemsIsMap, io.swagger.v3.oas.models.media.Schema schema) -
setUseBeanValidation
public void setUseBeanValidation(boolean useBeanValidation) - Specified by:
setUseBeanValidation
in interfaceorg.openapitools.codegen.languages.features.BeanValidationFeatures
- Overrides:
setUseBeanValidation
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
setUseOptional
public void setUseOptional(boolean useOptional) - Specified by:
setUseOptional
in interfaceorg.openapitools.codegen.languages.features.OptionalFeatures
-
setVisitable
public void setVisitable(boolean visitable) -
createDiscriminator
protected org.openapitools.codegen.CodegenDiscriminator createDiscriminator(String schemaName, io.swagger.v3.oas.models.media.Schema schema) - Overrides:
createDiscriminator
in classorg.openapitools.codegen.DefaultCodegen
-
toApiVarName
- Specified by:
toApiVarName
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
toApiVarName
in classorg.openapitools.codegen.DefaultCodegen
-
isReservedWord
- Overrides:
isReservedWord
in classorg.openapitools.codegen.DefaultCodegen
-
isVisitable
public boolean isVisitable() -
sanitizeTag
- Specified by:
sanitizeTag
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
sanitizeTag
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
toApiName
- Specified by:
toApiName
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
toApiName
in classorg.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 interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
addOperationToGroup
in classorg.openapitools.codegen.DefaultCodegen
-
preprocessOpenAPI
public void preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openApi) - Specified by:
preprocessOpenAPI
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
preprocessOpenAPI
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
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 classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
fromModel
public org.openapitools.codegen.CodegenModel fromModel(String name, io.swagger.v3.oas.models.media.Schema model) - Specified by:
fromModel
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
fromModel
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
toEnumValue
- Overrides:
toEnumValue
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
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 interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
fromOperation
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
toVarName
- Overrides:
toVarName
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
getterAndSetterCapitalize
- Overrides:
getterAndSetterCapitalize
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
postProcessAllModels
public Map<String,org.openapitools.codegen.model.ModelsMap> postProcessAllModels(Map<String, org.openapitools.codegen.model.ModelsMap> objs) - Specified by:
postProcessAllModels
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
postProcessAllModels
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
isGenerateHardNullable
public boolean isGenerateHardNullable() -
setParameterExampleValue
public void setParameterExampleValue(org.openapitools.codegen.CodegenParameter p) - Overrides:
setParameterExampleValue
in classorg.openapitools.codegen.languages.AbstractJavaCodegen
-
getParameterExampleValue
protected String getParameterExampleValue(org.openapitools.codegen.CodegenParameter p, boolean groovy) -
getPropertyExampleValue
protected String getPropertyExampleValue(org.openapitools.codegen.CodegenProperty p, boolean groovy) -
getExampleValue
-
escapeTextGroovy
-
addMustacheLambdas
protected com.google.common.collect.ImmutableMap.Builder<String,com.samskivert.mustache.Mustache.Lambda> addMustacheLambdas()- Overrides:
addMustacheLambdas
in classorg.openapitools.codegen.DefaultCodegen
-
setSerializationLibrary
-
setDateTimeLibrary
-
getUseInlineModelResolver
public boolean getUseInlineModelResolver()- Specified by:
getUseInlineModelResolver
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
getUseInlineModelResolver
in classorg.openapitools.codegen.DefaultCodegen
-
postProcess
public void postProcess()- Specified by:
postProcess
in interfaceorg.openapitools.codegen.CodegenConfig
- Overrides:
postProcess
in classorg.openapitools.codegen.DefaultCodegen
-