JsonSchemaObject class
A JSON Schema object.
- Annotations
-
- @freezed
Constructors
-
JsonSchemaObject({required String name, @JsonKey.new(includeIfNull: false) String? description, required Map<
String, dynamic> schema, @JsonKey.new(includeIfNull: false) @Default.new(false) bool? strict}) -
Factory constructor for JsonSchemaObject
constfactory
-
JsonSchemaObject.fromJson(Map<
String, dynamic> json) -
Object construction from a JSON representation
factory
Properties
-
copyWith
→ $JsonSchemaObjectCopyWith<
JsonSchemaObject> -
Create a copy of JsonSchemaObject
with the given fields replaced by the non-null parameter values.
no setterinherited
- description → String?
-
A description of what the response format is for, used by the model to determine how to respond in the
format.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
length of 64.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
schema
→ Map<
String, dynamic> -
The schema for the response format, described as a JSON Schema object.
no setterinherited
- strict → bool?
-
Whether to enable strict schema adherence when generating the output. If set to true, the model will always
follow the exact schema defined in the
schemafield. Only a subset of JSON Schema is supported whenstrictistrue. To learn more, read the Structured Outputs guide.no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this JsonSchemaObject to a JSON map.
inherited
-
toMap(
) → Map< String, dynamic> - Map representation of object (not serialized)
-
toString(
) → String -
A string representation of this object.
inherited
-
validateSchema(
) → String? - Perform validations on the schema property values
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
propertyNames
→ const List<
String> - List of all property names of schema