Enum PrimitiveType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PrimitiveType>

    @Internal
    public enum PrimitiveType
    extends java.lang.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
    • Field Detail

      • datatypeMappings

        public static final java.util.Map<java.lang.String,​java.lang.String> datatypeMappings
    • Method Detail

      • values

        public static PrimitiveType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PrimitiveType c : PrimitiveType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PrimitiveType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • customExcludedClasses

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

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

        public static java.util.Map<java.lang.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 java.util.Set<java.lang.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 java.util.Set<java.lang.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 java.util.Set<java.lang.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​(java.lang.reflect.Type type)
      • fromName

        public static PrimitiveType fromName​(java.lang.String name)
      • fromTypeAndFormat

        public static PrimitiveType fromTypeAndFormat​(java.lang.String type,
                                                      java.lang.String format)
      • createProperty

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

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

        public static java.lang.String getCommonName​(java.lang.reflect.Type type)
      • getKeyClass

        public java.lang.Class<?> getKeyClass()
      • getCommonName

        public java.lang.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