Enum Class PrimitiveType
- All Implemented Interfaces:
Serializable
,Comparable<PrimitiveType>
,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract io.swagger.v3.oas.models.media.Schema<?>
static io.swagger.v3.oas.models.media.Schema<?>
createProperty
(Type type) static io.swagger.v3.oas.models.media.Schema<?>
createProperty
(String name) static Map<String,
PrimitiveType> Adds support for custom mapping of classes to primitive typesAdds support for custom mapping of classes to primitive typesAdds support for custom mapping of classes to primitive typesstatic void
Convenience method to map LocalTime to string primitive with rfc3339 format partial-time.static PrimitiveType
static PrimitiveType
static PrimitiveType
fromTypeAndFormat
(Type type, String format) static PrimitiveType
fromTypeAndFormat
(String type, String format) static String
getCommonName
(Type type) Class<?>
package names NOT to be considered as "system" typesclass qualified names NOT to be considered as "system" typesclass qualified names prefixes to be considered as "system" typesstatic PrimitiveType
Returns the enum constant of this class with the specified name.static PrimitiveType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
-
BOOLEAN
-
BYTE
-
BINARY
-
URI
-
URL
-
EMAIL
-
UUID
-
INT
-
LONG
-
FLOAT
-
DOUBLE
-
INTEGER
-
DECIMAL
-
NUMBER
-
DATE
-
DATE_TIME
-
PARTIAL_TIME
-
FILE
-
OBJECT
-
-
Field Details
-
datatypeMappings
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
customExcludedClasses
Adds support for custom mapping of classes to primitive types- Returns:
- Set of custom classes to primitive type
- Since:
- 2.0.6
-
customExcludedExternalClasses
Adds support for custom mapping of classes to primitive types- Returns:
- Set of custom classes to primitive type
- Since:
- 2.1.2
-
customClasses
Adds support for custom mapping of classes to primitive types- Returns:
- Map of custom classes to primitive type
- Since:
- 2.0.6
-
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
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
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
-
fromTypeAndFormat
-
fromType
-
fromName
-
fromTypeAndFormat
-
createProperty
-
createProperty
-
getCommonName
-
getKeyClass
-
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
-