OpenApiV30Schema class final
The structure, constraints, and annotations of a payload.
Constructors
-
OpenApiV30Schema({String? title, String? description, OpenApiV30Type? type, String? format, bool? nullable, JsonValue? defaultValue, JsonValue? example, List<
JsonValue> ? enumValues, num? multipleOf, num? maximum, bool? exclusiveMaximum, num? minimum, bool? exclusiveMinimum, int? maxLength, int? minLength, String? pattern, int? maxItems, int? minItems, bool? uniqueItems, int? maxProperties, int? minProperties, List<String> ? requiredProperties, OpenApiV30RefOr<OpenApiV30Schema> ? not, List<OpenApiV30RefOr< ? allOf, List<OpenApiV30Schema> >OpenApiV30RefOr< ? oneOf, List<OpenApiV30Schema> >OpenApiV30RefOr< ? anyOf, OpenApiV30RefOr<OpenApiV30Schema> >OpenApiV30Schema> ? items, Map<String, OpenApiV30RefOr< ? properties, OpenApiV30AdditionalProperties? additionalProperties, OpenApiV30Discriminator? discriminator, bool? readOnly, bool? writeOnly, OpenApiV30Xml? xml, OpenApiV30ExternalDocumentation? externalDocs, bool? deprecated, Map<OpenApiV30Schema> >String, JsonValue> extensions = const {}, Map<String, JsonValue> extraFields = const {}}) - Sets the constraints and annotations for a payload.
Properties
- additionalProperties → OpenApiV30AdditionalProperties?
-
Rule for properties outside the declared property schemas.
final
-
allOf
→ List<
OpenApiV30RefOr< ?OpenApiV30Schema> > -
Schemas that must all match the instance.
final
-
anyOf
→ List<
OpenApiV30RefOr< ?OpenApiV30Schema> > -
At least one of these schemas must match the instance.
final
- defaultValue → JsonValue?
-
The default value declared by the author.
final
- deprecated → bool?
-
Whether the author discourages new uses.
final
- description → String?
-
Description supplied by the document author.
final
- discriminator → OpenApiV30Discriminator?
-
The property used to select a more specific schema.
final
-
enumValues
→ List<
JsonValue> ? -
Allowed values from
enum, in source order.final - example → JsonValue?
-
An inline example value.
final
- exclusiveMaximum → bool?
-
Whether values must be less than the upper bound.
final
- exclusiveMinimum → bool?
-
Whether values must exceed the lower bound.
final
-
extensions
→ Map<
String, JsonValue> -
Specification extensions keyed by their
x-names. Defaults to empty.finalinherited - externalDocs → OpenApiV30ExternalDocumentation?
-
A link to related documentation.
final
-
extraFields
→ Map<
String, JsonValue> -
Unrecognized fields retained for JSON export. Defaults to empty.
finalinherited
- format → String?
-
Format identifier that refines the declared type.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
items
→ OpenApiV30RefOr<
OpenApiV30Schema> ? -
Rules for the elements of an array.
final
- maximum → num?
-
Upper numeric bound.
final
- maxItems → int?
-
Maximum number of array elements.
final
- maxLength → int?
-
Maximum string length in Unicode code points.
final
- maxProperties → int?
-
Maximum number of object properties.
final
- minimum → num?
-
Lower numeric bound.
final
- minItems → int?
-
Minimum number of array elements.
final
- minLength → int?
-
Minimum string length in Unicode code points.
final
- minProperties → int?
-
Minimum number of object properties.
final
- multipleOf → num?
-
Valid numbers must be multiples of this positive value.
final
-
not
→ OpenApiV30RefOr<
OpenApiV30Schema> ? -
Schema that the instance must fail to match.
final
- nullable → bool?
-
Whether the declared type also accepts null.
final
-
oneOf
→ List<
OpenApiV30RefOr< ?OpenApiV30Schema> > -
Exactly one of these schemas must match the instance.
final
- pattern → String?
-
Regular expression that a string must match.
final
-
properties
→ Map<
String, OpenApiV30RefOr< ?OpenApiV30Schema> > -
Schemas indexed by property name.
final
- readOnly → bool?
-
Marks a property for use in responses.
final
-
requiredProperties
→ List<
String> ? -
Property names that an object must contain.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String?
-
Human-readable title.
final
- type → OpenApiV30Type?
-
Allowed instance type.
final
- uniqueItems → bool?
-
Whether all array elements must be distinct.
final
- writeOnly → bool?
-
Marks a property for use in requests.
final
- xml → OpenApiV30Xml?
-
XML serialization rules.
final
Methods
-
extraToJson(
) → Map< String, Object?> -
Exports extensions and unrecognized fields as JSON.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
Returns a detached JSON representation.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited