Schema class final
The definition of an input or output data types.
These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object.
Constructors
-
Schema(SchemaType type, {String? format, String? description, bool? nullable, List<
String> ? enumValues, Schema? items, Map<String, Schema> ? properties, List<String> ? requiredProperties}) - Schema.array({required Schema items, String? description, bool? nullable})
- Construct a schema for an array of values with a specified type.
- Schema.boolean({String? description, bool? nullable})
- Construct a schema for bool value.
-
Schema.enumString({required List<
String> enumValues, String? description, bool? nullable}) - Construct a schema for String value with enumerated possible values.
- Schema.integer({String? description, bool? nullable, String? format})
- Construct a schema for an integer number.
- Schema.number({String? description, bool? nullable, String? format})
- Construct a schema for a non-integer number.
-
Schema.object({required Map<
String, Schema> properties, List<String> ? requiredProperties, String? description, bool? nullable}) - Construct a schema for an object with one or more properties.
- Schema.string({String? description, bool? nullable})
- Construct a schema for a String value.
Properties
- description ↔ String?
-
A brief description of the parameter.
getter/setter pair
-
enumValues
↔ List<
String> ? -
Possible values if this is a SchemaType.string with an enum format.
getter/setter pair
- format ↔ String?
-
The format of the data.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- items ↔ Schema?
-
Schema for the elements if this is a SchemaType.array.
getter/setter pair
- nullable ↔ bool?
-
Whether the value mey be null.
getter/setter pair
-
properties
↔ Map<
String, Schema> ? -
Properties of this type if this is a SchemaType.object.
getter/setter pair
-
requiredProperties
↔ List<
String> ? -
The keys from properties for properties that are required if this is a
SchemaType.object.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type ↔ SchemaType
-
The type of this value.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited