GenericPropertyDefinition
Represents a property definition without specific type constraints.
Used for schemas that:
Have no type specified
Have multiple types
Have heterogeneous enums with mixed types
This allows maximum flexibility while still supporting validation keywords like enum.
Constructors
Properties
Constraint for additional properties in the object.
Const value as JsonElement (spec-compliant storage). Can be any JSON value per JSON Schema 2020-12 spec.
Schema that at least one array item must match.
If the instance value is a string, this property defines that the string SHOULD be interpreted as encoded binary data and decoded using the encoding named by this property.
If the instance is a string, this property indicates the media type of the contents of the string. If contentEncoding is present, this property describes the decoded string.
If the instance is a string, and if "contentMediaType" is present, this property contains a schema which describes the structure of the string.
Default value as JsonElement (spec-compliant storage). Can be any JSON value per JSON Schema 2020-12 spec.
A map of property names to lists of other property names that are required if the given property is present.
A map of property names to schemas that must be satisfied if the given property is present.
This keyword's value MUST be a valid JSON Schema.
This keyword's value MUST be a valid JSON Schema.
Schema for array items.
Maximum number of items that can match the "contains" schema.
Maximum number of items allowed in the array.
Maximum number of properties allowed in the object.
Minimum number of items that must match the "contains" schema.
Minimum number of items allowed in the array.
Minimum number of properties allowed in the object.
Map of property definitions for properties matching a regular expression pattern.
Array of schemas for positional items.
Map of property definitions.
Schema for property names.
This keyword's value MUST be a valid JSON Schema.
The data type of the property.
Schema for unevaluated array items.
Schema for unevaluated properties.
Whether all items in the array must be unique.
Functions
Returns the allOf property definition for name, or null if not found or not an allOf.
Returns the anyOf property definition for name, or null if not found or not an anyOf.
Returns the array property definition for name, or null if not found or not an array property.
Returns the boolean property definition for name, or null if not found or not a boolean property.
Returns the boolean schema definition for name, or null if not found or not a boolean schema.
Returns the const value as a JsonElement (any JSON value).
Returns the default value as a JsonElement (any JSON value).
Returns the numeric property definition for name, or null if not found or not a numeric property.
Returns the object property definition for name, or null if not found or not an object property.
Returns the oneOf property definition for name, or null if not found or not a oneOf.
Returns the reference property definition for name, or null if not found or not a reference.
Returns the string property definition for name, or null if not found or not a string property.