JsonSchema<T> class
JSON Schema object representing a JSON schema definition.
- Inheritance
-
- Object
- OpenApiObject<
Map< String, dynamic> > - JsonSchema
- Implementers
Constructors
-
JsonSchema({String? id, String? schema, String? title, String? description, num? multipleOf, num? maximum, bool? exclusiveMaximum, num? minimum, bool? exclusiveMinimum, int? maxLength, int? minLength, Pattern? pattern, bool? additionalItems, OpenApiObject<
Map> ? items, int? maxItems, int? minItems, bool? uniqueItems, int? maxProperties, int? minProperties, List<String> ? required, Map<String, dynamic> ? additionalProperties, bool hasAdditionalProperties = false, Map<String, JsonSchema> ? definitions, Map<String, OpenApiObject< ? properties, Map<Map> >String, JsonSchema> ? patternProperties, Map<String, dynamic> ? dependencies, List? enumValues, OpenApiType? type, List<JsonSchema> ? allOf, List<JsonSchema> ? anyOf, List<JsonSchema> ? oneOf, OpenApiObject<Map> ? not, String? ref, Object? defaultValue}) - Creates a JsonSchema with the given parameters.
Properties
- additionalItems → bool?
-
Indicates whether additional items are allowed in an array.
final
-
additionalProperties
→ Map<
String, dynamic> ? -
A map of additional properties in an object.
final
-
allOf
→ List<
JsonSchema> ? -
A list of schemas that must all be valid.
final
-
anyOf
→ List<
JsonSchema> ? -
A list of schemas where at least one must be valid.
final
- defaultValue → Object?
-
The default value for the schema.
final
-
definitions
→ Map<
String, JsonSchema> ? -
A map of schema definitions.
final
-
dependencies
→ Map<
String, dynamic> ? -
A map of dependencies for properties.
final
- description → String?
-
The description of the schema.
final
- enumValues → List?
-
An enumeration of possible values.
final
- exclusiveMaximum → bool?
-
Indicates whether the maximum value is exclusive.
final
- exclusiveMinimum → bool?
-
Indicates whether the minimum value is exclusive.
final
-
extensions
→ Map<
String, dynamic> ? -
Vendor-specific extension fields (
x-*) merged into the object.finalinherited - hasAdditionalProperties → bool
-
Indicates whether additional properties are allowed in an object.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
The identifier for the schema.
final
-
items
→ OpenApiObject<
Map> ? -
The schema defining the type of items in an array.
final
- maximum → num?
-
The maximum value of the number.
final
- maxItems → int?
-
The maximum number of items in an array.
final
- maxLength → int?
-
The maximum length of the string.
final
- maxProperties → int?
-
The maximum number of properties in an object.
final
- minimum → num?
-
The minimum value of the number.
final
- minItems → int?
-
The minimum number of items in an array.
final
- minLength → int?
-
The minimum length of the string.
final
- minProperties → int?
-
The minimum number of properties in an object.
final
- multipleOf → num?
-
A number that the value must be a multiple of.
final
-
not
→ OpenApiObject<
Map> ? -
A schema that must not be valid.
final
-
oneOf
→ List<
JsonSchema> ? -
A list of schemas where exactly one must be valid.
final
- pattern → Pattern?
-
A regular expression pattern that the string must match.
final
-
patternProperties
→ Map<
String, JsonSchema> ? -
A map of pattern property schemas.
final
-
properties
→ Map<
String, OpenApiObject< ?Map> > -
A map of property schemas.
final
- ref → String?
-
A reference to an external definition of the schema.
final
-
required
→ List<
String> ? -
A list of required properties in an object.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schema → String?
-
The schema version.
final
- title → String?
-
The title of the schema.
final
- type → OpenApiType?
-
The type of the schema (e.g., "string", "number", "integer", "boolean", "array", "object").
final
- uniqueItems → bool?
-
Indicates whether the items in an array must be unique.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toMap(
) → Map< String, dynamic> -
Converts the OpenApiObject to a map.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited