Class Utils

java.lang.Object
io.micronaut.openapi.generator.Utils

public final class Utils extends Object
Utilities methods to generators.
Since:
5.2.0
  • Field Details

  • 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 - operation
      params - parameters
      isKotlin - 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)
    • processGenericAnnotations

      public static void processGenericAnnotations(org.openapitools.codegen.CodegenProperty property, boolean useBeanValidation, boolean isGenerateHardNullable, boolean isNullable, boolean isRequired, boolean isReadonly, boolean withNullablePostfix)
    • 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)
    • addStrValueToEnum

      public static void addStrValueToEnum(org.openapitools.codegen.CodegenProperty property)
    • addStrValueToEnum

      public static void addStrValueToEnum(org.openapitools.codegen.CodegenModel model)
    • addStrValueToEnum

      public static void addStrValueToEnum(List<Object> enumVars, boolean isNumeric)
    • toApiName

      public static String toApiName(String name, String prefix, String suffix)
    • normalizeExtraAnnotations

      public static void normalizeExtraAnnotations(String extName, boolean isKotlin, Map<String,Object> vendorExtensions)
    • isDateType

      public static boolean isDateType(String type)