Package io.micronaut.openapi.generator
Class Utils
java.lang.Object
io.micronaut.openapi.generator.Utils
Utilities methods to generators.
- Since:
- 5.2.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddEnumParamsForConverters(String modelPackage, org.openapitools.codegen.CodegenParameter param, Map<String, Integer> converterCounters, List<org.openapitools.codegen.CodegenParameter> enumParams, List<String> enumImports, boolean isKotlin) static voidaddStrValueToEnum(List<Object> enumVars, boolean isNumeric) static voidaddStrValueToEnum(org.openapitools.codegen.CodegenModel model) static voidaddStrValueToEnum(org.openapitools.codegen.CodegenProperty property) static booleanaddUserParameter(org.openapitools.codegen.CodegenOperation op, UserParameterMode userParameterMode, boolean isAnonymous, boolean isDenyAll) static StringcalcQueryValueFormat(org.openapitools.codegen.CodegenParameter param) static booleanisDateType(String type) static voidnormalizeExtraAnnotations(String extName, boolean isKotlin, Map<String, Object> vendorExtensions) static StringnormalizeStr(String str) static voidnormalizeStrValue(String key, Map<String, Object> exts) static voidprocessDuplicateVars(List<org.openapitools.codegen.CodegenProperty> vars) static voidprocessGenericAnnotations(String dataType, String dataTypeWithEnum, boolean isMap, String containerType, org.openapitools.codegen.CodegenProperty itemsProp, Map<String, Object> ext, boolean useBeanValidation, boolean isGenerateHardNullable, boolean isNullable, boolean isRequired, boolean isReadonly, boolean withNullablePostfix, boolean isKotlin, boolean ksp) static voidprocessGenericAnnotations(org.openapitools.codegen.CodegenParameter parameter, boolean useBeanValidation, boolean isGenerateHardNullable, boolean isNullable, boolean isRequired, boolean isReadonly, boolean withNullablePostfix, boolean isKotlin, boolean ksp) static voidprocessGenericAnnotations(org.openapitools.codegen.CodegenProperty property, boolean useBeanValidation, boolean isGenerateHardNullable, boolean isNullable, boolean isRequired, boolean isReadonly, boolean withNullablePostfix, boolean isKotlin, boolean ksp) processMultipartBody(org.openapitools.codegen.CodegenOperation op, Collection<org.openapitools.codegen.CodegenParameter> params, boolean isKotlin) Replace multipart data parameters, marked @Part annotation to single MultipartBody parameter.static booleanreadBooleanProperty(String propertyKey, Map<String, Object> additionalProperties, boolean defaultValue) readListOfStringsProperty(Object value) readListOfStringsProperty(String property, Map<String, Object> additionalProperties) static String
-
Field Details
-
DATE_TIME_TYPES
-
DIVIDE_OPERATIONS_BY_CONTENT_TYPE
- See Also:
-
DEFAULT_BODY_PARAM_NAME
- See Also:
-
EXT_ANNOTATIONS_OPERATION
- See Also:
-
EXT_ANNOTATIONS_CLASS
- See Also:
-
EXT_ANNOTATIONS_FIELD
- See Also:
-
EXT_ANNOTATIONS_SETTER
- See Also:
-
NULL_STRING
- See Also:
-
-
Method Details
-
processMultipartBody
public static org.apache.commons.lang3.tuple.Pair<org.openapitools.codegen.CodegenParameter,Set<String>> processMultipartBody(org.openapitools.codegen.CodegenOperation op, Collection<org.openapitools.codegen.CodegenParameter> params, boolean isKotlin) Replace multipart data parameters, marked @Part annotation to single MultipartBody parameter.- Parameters:
op- operationparams- parametersisKotlin- is kotlin generator- Returns:
- Pair with MultipartBody parameter and set of removed parameter names
-
processGenericAnnotations
public static void processGenericAnnotations(org.openapitools.codegen.CodegenParameter parameter, boolean useBeanValidation, boolean isGenerateHardNullable, boolean isNullable, boolean isRequired, boolean isReadonly, boolean withNullablePostfix, boolean isKotlin, boolean ksp) -
processGenericAnnotations
public static void processGenericAnnotations(org.openapitools.codegen.CodegenProperty property, boolean useBeanValidation, boolean isGenerateHardNullable, boolean isNullable, boolean isRequired, boolean isReadonly, boolean withNullablePostfix, boolean isKotlin, boolean ksp) -
processGenericAnnotations
public static void processGenericAnnotations(String dataType, String dataTypeWithEnum, boolean isMap, String containerType, org.openapitools.codegen.CodegenProperty itemsProp, Map<String, Object> ext, boolean useBeanValidation, boolean isGenerateHardNullable, boolean isNullable, boolean isRequired, boolean isReadonly, boolean withNullablePostfix, boolean isKotlin, boolean ksp) -
addStrValueToEnum
public static void addStrValueToEnum(org.openapitools.codegen.CodegenProperty property) -
addStrValueToEnum
public static void addStrValueToEnum(org.openapitools.codegen.CodegenModel model) -
addStrValueToEnum
-
normalizeStrValue
-
normalizeStr
-
toApiName
-
normalizeExtraAnnotations
-
isDateType
-
readListOfStringsProperty
-
readListOfStringsProperty
-
readBooleanProperty
-
calcQueryValueFormat
-
processDuplicateVars
-
addEnumParamsForConverters
-
addUserParameter
public static boolean addUserParameter(org.openapitools.codegen.CodegenOperation op, UserParameterMode userParameterMode, boolean isAnonymous, boolean isDenyAll)
-