SchemaObjectV2 class

Schema object representing a data model in the API.

Inheritance

Constructors

SchemaObjectV2({String? title, String? description, OpenApiType? type, num? multipleOf, Object? defaultValue, num? maximum, bool? exclusiveMaximum, num? minimum, bool? exclusiveMinimum, int? maxLength, int? minLength, Pattern? pattern, Map<String, dynamic>? additionalProperties, bool hasAdditionalProperties = false, int? maxItems, int? minItems, bool? uniqueItems, int? maxProperties, int? minProperties, List<String>? required, List? enumValues, Map<String, SchemaObjectV2>? properties, List<JsonSchema>? allOf, List<JsonSchema>? anyOf, List<JsonSchema>? oneOf, OpenApiObject<Map>? not, String? discriminator, bool? readOnly, XmlObjectV2? xml, ExternalDocumentationObjectV2? externalDocs, Object? example, OpenApiObject<Map>? items, String? id, String? schema, bool? additionalItems, Map<String, JsonSchema>? definitions, Map<String, JsonSchema>? patternProperties, Map<String, dynamic>? dependencies, String? ref})
Creates a SchemaObjectV2 with the given parameters.
SchemaObjectV2.fromMap(Map map)
Creates a SchemaObjectV2 from a map.
factory

Properties

additionalItems bool?
Indicates whether additional items are allowed in an array.
finalinherited
additionalProperties Map<String, dynamic>?
A map of additional properties in an object.
finalinherited
allOf List<JsonSchema>?
A list of schemas that must all be valid.
finalinherited
anyOf List<JsonSchema>?
A list of schemas where at least one must be valid.
finalinherited
defaultValue Object?
The default value of the schema.
final
definitions Map<String, JsonSchema>?
A map of schema definitions.
finalinherited
dependencies Map<String, dynamic>?
A map of dependencies for properties.
finalinherited
description String?
The description of the schema.
finalinherited
discriminator String?
The discriminator property name, used to differentiate between different schema types in polymorphic scenarios.
final
enumValues List?
An enumeration of possible values.
finalinherited
example Object?
An example instance of the schema.
final
exclusiveMaximum bool?
Indicates whether the maximum value is exclusive.
finalinherited
exclusiveMinimum bool?
Indicates whether the minimum value is exclusive.
finalinherited
extensions Map<String, dynamic>?
Vendor-specific extension fields (x-*) merged into the object.
finalinherited
externalDocs ExternalDocumentationObjectV2?
Additional external documentation for the schema.
final
hasAdditionalProperties bool
Indicates whether additional properties are allowed in an object.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
id String?
The identifier for the schema.
finalinherited
items OpenApiObject<Map>?
The schema defining the type of items in an array.
finalinherited
maximum num?
The maximum value of the number.
finalinherited
maxItems int?
The maximum number of items in an array.
finalinherited
maxLength int?
The maximum length of the string.
finalinherited
maxProperties int?
The maximum number of properties in an object.
finalinherited
minimum num?
The minimum value of the number.
finalinherited
minItems int?
The minimum number of items in an array.
finalinherited
minLength int?
The minimum length of the string.
finalinherited
minProperties int?
The minimum number of properties in an object.
finalinherited
multipleOf num?
A number that the value must be a multiple of.
finalinherited
not OpenApiObject<Map>?
A schema that must not be valid.
finalinherited
oneOf List<JsonSchema>?
A list of schemas where exactly one must be valid.
finalinherited
pattern Pattern?
A regular expression pattern that the string must match.
finalinherited
patternProperties Map<String, JsonSchema>?
A map of pattern property schemas.
finalinherited
properties Map<String, SchemaObjectV2>?
A map of property schemas.
final
readOnly bool?
Indicates whether the property is read-only.
final
ref String?
A reference to an external definition of the schema.
finalinherited
required List<String>?
A list of required properties in an object.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema String?
The schema version.
finalinherited
title String?
The title of the schema.
finalinherited
type OpenApiType?
The type of the schema (e.g., "string", "number", "integer", "boolean", "array", "object").
finalinherited
uniqueItems bool?
Indicates whether the items in an array must be unique.
finalinherited
xml XmlObjectV2?
Additional XML metadata for the schema.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
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