Enum Class PrimitiveType

java.lang.Object
java.lang.Enum<PrimitiveType>
io.micronaut.openapi.swagger.core.util.PrimitiveType
All Implemented Interfaces:
Serializable, Comparable<PrimitiveType>, Constable

public enum PrimitiveType extends Enum<PrimitiveType>
The PrimitiveType enumeration defines a mapping of limited set of classes into Swagger primitive types.

This class is copied from swagger-core library.

Since:
4.6.0
  • Enum Constant Details

  • Field Details

    • datatypeMappings

      public static final Map<String,String> datatypeMappings
  • Method Details

    • values

      public static PrimitiveType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PrimitiveType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • customExcludedClasses

      public static Set<String> customExcludedClasses()
      Adds support for custom mapping of classes to primitive types
      Returns:
      Set of custom classes to primitive type
      Since:
      2.0.6
    • customExcludedExternalClasses

      public static Set<String> customExcludedExternalClasses()
      Adds support for custom mapping of classes to primitive types
      Returns:
      Set of custom classes to primitive type
      Since:
      2.1.2
    • customClasses

      public static Map<String,PrimitiveType> customClasses()
      Adds support for custom mapping of classes to primitive types
      Returns:
      Map of custom classes to primitive type
      Since:
      2.0.6
    • systemPrefixes

      public static Set<String> systemPrefixes()
      class qualified names prefixes to be considered as "system" types
      Returns:
      Mutable set of class qualified names prefixes to be considered as "system" types
      Since:
      2.0.6
    • nonSystemTypes

      public static Set<String> nonSystemTypes()
      class qualified names NOT to be considered as "system" types
      Returns:
      Mutable set of class qualified names NOT to be considered as "system" types
      Since:
      2.0.6
    • nonSystemTypePackages

      public static Set<String> nonSystemTypePackages()
      package names NOT to be considered as "system" types
      Returns:
      Mutable set of package names NOT to be considered as "system" types
      Since:
      2.0.6
    • fromType

      public static PrimitiveType fromType(Type type)
    • fromName

      public static PrimitiveType fromName(String name)
    • fromTypeAndFormat

      public static PrimitiveType fromTypeAndFormat(String type, String format)
    • createProperty

      public static io.swagger.v3.oas.models.media.Schema createProperty(Type type)
    • createProperty

      public static io.swagger.v3.oas.models.media.Schema createProperty(String name)
    • getCommonName

      public static String getCommonName(Type type)
    • getKeyClass

      public Class<?> getKeyClass()
    • getCommonName

      public String getCommonName()
    • createProperty

      public abstract io.swagger.v3.oas.models.media.Schema createProperty()
    • enablePartialTime

      public static void enablePartialTime()
      Convenience method to map LocalTime to string primitive with rfc3339 format partial-time. See link
      Since:
      2.0.6