JsonSchema class

JsonSchema representation of schema metadata

Constructors

JsonSchema({String? P_comment, Map<String, JsonSchema>? P_defs, String? P_id, String? P_ref, String? P_schema, Map<String, Object?>? additionalDetails, JsonSchema? additionalItems, JsonSchema? additionalProperties, List<JsonSchema>? allOf, List<JsonSchema>? anyOf, Object? const_, JsonSchema? contains, String? contentEncoding, String? contentMediaType, Object? default_, Map<String, JsonSchema>? definitions, Map<String, Object?>? dependencies, String? description, JsonSchema? else_, List<Object?>? enum_, List<Object?>? examples, Object? exclusiveMaximum, Object? exclusiveMinimum, String? format, JsonSchema? if_, JsonSchema? items, String? jdbcType, int? maxItems, int? maxLength, int? maxProperties, Object? maximum, int? minItems, int? minLength, int? minProperties, Object? minimum, double? multipleOf, JsonSchema? not, List<JsonSchema>? oneOf, String? pattern, Map<String, JsonSchema>? patternProperties, Map<String, JsonSchema>? properties, JsonSchema? propertyNames, bool? readOnly, List<String>? required, JsonSchema? then, String? title, List<String>? type, bool? uniqueItems, bool? writeOnly})
JsonSchema.fromJson(Map json_)

Properties

additionalDetails Map<String, Object?>?
Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema
getter/setter pair
additionalItems JsonSchema?
Schema for additional items.
getter/setter pair
additionalProperties JsonSchema?
Schema for additional properties.
getter/setter pair
allOf List<JsonSchema>?
Schema that must be valid against all of the sub-schemas.
getter/setter pair
anyOf List<JsonSchema>?
Schema that must be valid against at least one of the sub-schemas.
getter/setter pair
const_ Object?
Const value that the data must match.
getter/setter pair
contains JsonSchema?
Schema that applies to at least one item in an array.
getter/setter pair
contentEncoding String?
Encoding of the content.
getter/setter pair
contentMediaType String?
Media type of the content.
getter/setter pair
default_ Object?
The default value of the field or object described by this schema.
getter/setter pair
definitions Map<String, JsonSchema>?
Definitions for the schema.
getter/setter pair
dependencies Map<String, Object?>?
Dependencies for the schema.
getter/setter pair
description String?
A description of this schema.
getter/setter pair
else_ JsonSchema?
Schema that must be valid if the "if" schema is invalid.
getter/setter pair
enum_ List<Object?>?
Possible values for an enumeration.
getter/setter pair
examples List<Object?>?
Examples of the value.
getter/setter pair
exclusiveMaximum Object?
Whether the maximum number value is exclusive.
getter/setter pair
exclusiveMinimum Object?
Whether the minimum number value is exclusive.
getter/setter pair
format String?
Format of the value as per https://json-schema.org/understanding-json-schema/reference/string.html#format
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
if_ JsonSchema?
Schema that must be valid if the "if" schema is valid.
getter/setter pair
items JsonSchema?
Schema that applies to array values, applicable only if this is of type array.
getter/setter pair
jdbcType String?
JDBC datatype of the field. Possible string values are:
getter/setter pair
maximum Object?
Maximum value of the number field.
getter/setter pair
maxItems int?
Maximum number of items in the array field.
getter/setter pair
maxLength int?
Maximum length of the string field.
getter/setter pair
maxProperties int?
Maximum number of properties.
getter/setter pair
minimum Object?
Minimum value of the number field.
getter/setter pair
minItems int?
Minimum number of items in the array field.
getter/setter pair
minLength int?
Minimum length of the string field.
getter/setter pair
minProperties int?
Minimum number of properties.
getter/setter pair
multipleOf double?
Number must be a multiple of this value.
getter/setter pair
not JsonSchema?
Schema that must not be valid.
getter/setter pair
oneOf List<JsonSchema>?
Schema that must be valid against at least one of the sub-schemas.
getter/setter pair
P_comment String?
A comment on the schema.
getter/setter pair
P_defs Map<String, JsonSchema>?
Definitions for the schema.
getter/setter pair
P_id String?
The URI defining the core schema meta-schema.
getter/setter pair
P_ref String?
A reference to another schema.
getter/setter pair
P_schema String?
The URI defining the schema.
getter/setter pair
pattern String?
Regex pattern of the string field.
getter/setter pair
patternProperties Map<String, JsonSchema>?
Pattern properties for the schema.
getter/setter pair
properties Map<String, JsonSchema>?
The child schemas, applicable only if this is of type object.
getter/setter pair
propertyNames JsonSchema?
Schema for property names.
getter/setter pair
readOnly bool?
Whether the value is read-only.
getter/setter pair
required List<String>?
Whether this property is required.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
then JsonSchema?
Schema that must be valid if the "if" schema is valid.
getter/setter pair
title String?
A title of the schema.
getter/setter pair
type List<String>?
JSON Schema Validation: A Vocabulary for Structural Validation of JSON
getter/setter pair
uniqueItems bool?
Whether the items in the array field are unique.
getter/setter pair
writeOnly bool?
Whether the value is write-only.
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