Format enum
This enum provides a set of commonly used formats that can be
paired with a type to give a more specific hint about the data's
intended structure and validation rules.
For example, type: string with format: date-time tells
consumers that the string should be a date and time value.
Note that the OpenAPI specification allows for custom, non-standard formats, so this enum is not exhaustive.
Values
- int32 → const Format
-
A signed 32-bit integer.
const Format('int32') - int64 → const Format
-
A signed 64-bit integer.
const Format('int64') - float → const Format
-
A single-precision floating-point number.
const Format('float') - double → const Format
-
A double-precision floating-point number.
const Format('double') - byte → const Format
-
Base64-encoded characters.
For example: "U3dhZ2dlciByb2Nrcw=="
const Format('byte') - binary → const Format
-
Binary data, used for file uploads or other binary content. The consumer can expect a raw binary octet stream.
const Format('binary') - date → const Format
-
A full-date as defined by RFC 3339.
For example: "2025-08-06"
const Format('date') - dateTime → const Format
-
A date-time as defined by RFC 3339.
For example: "2025-08-06T12:00:00Z"
const Format('date-time') - password → const Format
-
A hint to user interfaces to obscure the input, such as a password field.
const Format('password')
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
The raw string value of the format.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited