Schema class

Represents a select subset of an OpenAPI 3.0 schema object.

Constructors

Schema({Schema? additionalProperties, List<Schema>? anyOf, Object? default_, Map<String, Schema>? defs, String? description, List<String>? enum_, Schema? items, String? maxItems, double? maximum, String? minItems, double? minimum, bool? nullable, List<Schema>? prefixItems, Map<String, Schema>? properties, String? ref, List<String>? required, String? title, String? type, bool? uniqueItems})
Schema.fromJson(Map json_)

Properties

additionalProperties Schema?
Can either be a boolean or an object, controls the presence of additional properties.
getter/setter pair
anyOf List<Schema>?
The value should be validated against any (one or more) of the subschemas in the list.
getter/setter pair
default_ Object?
Default value of the data.
getter/setter pair
defs Map<String, Schema>?
A map of definitions for use by ref.
getter/setter pair
description String?
The description of the data.
getter/setter pair
enum_ List<String>?
Possible values of the element of primitive type with enum format.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
items Schema?
Schema of the elements of Type.ARRAY.
getter/setter pair
maximum double?
Maximum value for Type.INTEGER and Type.NUMBER.
getter/setter pair
maxItems String?
Maximum number of the elements for Type.ARRAY.
getter/setter pair
minimum double?
Minimum value for Type.INTEGER and Type.NUMBER.
getter/setter pair
minItems String?
Minimum number of the elements for Type.ARRAY.
getter/setter pair
nullable bool?
Indicates if the value may be null.
getter/setter pair
prefixItems List<Schema>?
Schemas of initial elements of Type.ARRAY.
getter/setter pair
properties Map<String, Schema>?
Properties of Type.OBJECT.
getter/setter pair
ref String?
Allows indirect references between schema nodes.
getter/setter pair
required List<String>?
Required properties of Type.OBJECT.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String?
The title of the schema.
getter/setter pair
type String?
The type of the data.
getter/setter pair
uniqueItems bool?
Indicate the items in the array must be unique.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited