Schema class

Schema for structured data.

Constructors

Schema({SchemaType? type, String? format, String? description, bool? nullable, List<String>? enumValues, Schema? items, Map<String, Schema>? properties, List<String>? required})
Creates a Schema.
const
Schema.fromJson(Map<String, dynamic> json)
Creates a Schema from JSON.
factory

Properties

description String?
Description of the property.
final
enumValues List<String>?
Enum values.
final
format String?
Format hint (e.g., "int32", "date-time").
final
hashCode int
The hash code for this object.
no setterinherited
items Schema?
Items schema for array type.
final
nullable bool?
Whether the value can be null.
final
properties Map<String, Schema>?
Properties for object type.
final
required List<String>?
Required properties for object type.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type SchemaType?
The type of the property.
final

Methods

copyWith({Object? type = unsetCopyWithValue, Object? format = unsetCopyWithValue, Object? description = unsetCopyWithValue, Object? nullable = unsetCopyWithValue, Object? enumValues = unsetCopyWithValue, Object? items = unsetCopyWithValue, Object? properties = unsetCopyWithValue, Object? required = unsetCopyWithValue}) Schema
Creates a copy with replaced values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts to JSON.
toString() String
A string representation of this object.
inherited

Operators

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