SchemaDefinition class
Defines the structure and constraints for a JSON schema.
Constructors
-
SchemaDefinition({required SchemaType type, required Map<
String, PropertyDefinition> properties, List<String> required = const [], String? description, List<Map< examples = const [], bool additionalProperties = false})String, dynamic> > -
const
Properties
- additionalProperties → bool
-
Whether additional properties are allowed.
final
- description → String?
-
Optional description of the schema.
final
-
examples
→ List<
Map< String, dynamic> > -
Example values for the schema.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
properties
→ Map<
String, PropertyDefinition> -
Properties definition for object types.
final
-
required
→ List<
String> -
List of required property names.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → SchemaType
-
The type of the schema (object, array, string, number, etc.).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJsonSchema(
) → Map< String, dynamic> - Creates a JSON schema representation.
-
toPromptInstruction(
) → String - Creates a human-readable prompt instruction.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited