A JSON Schema is built up from schema objects, each schema containing its own sub schemas.
In order to depict this graphically schemas are rendered in number of different ways, but still have the same properties and children.
All schema items have the following Inline Properties.
Properties
Const
Comment
Default
Description
Enum
Examples
ID
Read Only
Title
TypeWrite Only
Array Constraints
Contains
MaxItems
MinItems
UniqueItems
Numeric Constraints
ExclusiveMaximum
ExclusiveMinimum
Maximum
Minimum
MultipleOf
Object Constraints
MaxProperties
MinProperties
Required
String Constraints
MaxLength
MinLength
Pattern
Content Encoding
Content Media Type
Many of these properties are dependent on the schemas type
All schemas can also have the following child nodes
Array Item Container (Array Item, Additional Items, Contains)
Properties Container (Property, Pattern Property, Additional Properties, Required Property, PropertyNames)
Dependency Container (Property Dependency, Schema Dependency)
Validation Rules : (AllOf, AnyOf, OneOf, Not, If Then Else)
These child nodes are dependent on the schemas type
This has all the standard schema properties, but can also have a Definition Container and $schema property.
The property node is a schema with a name, the name is used to match it against members in the instance object.
The Pattern Property node is a schema with a name, the name is used as a regular expression to match it against members in the instance object.
The Pattern Property node is a place holder for a schema, it has none of the properties of child items of a schema, but can be converted into a schema using the 'Convert to Property' setting in the property window.
The Additional Properties node initially behaves as a placeholder for a schema, but once a child item is added or the "Convert to schema" property is set it behave like a regular schema.
The Array Item node is a schema, it has no is shown with the name gives it an index which indicates the item in the instance array that it will be used to validate.
The Additional Array Items node can behave as a schema or as a placeholder for a schema.
When its behaving as a placeholder adding a child or setting the "Convert to schema" property will convert it to a schema and it will then operate as a regular schema.
A Definition Node is just a named schema node within the Definition Container node. It behaves the same as any other schema.
The nodes AllOf, AnyOf, OneOf can contain 1 or more child schemas, these schemas shown in grey behave like any other schema, but are explicitly shown within the diagram.
The Not is similar in that it is an explicitly defined schema, but it behaves as all other schemas do.
The child schema node of a Schema Dependency behaves as a normal schema. Note : This is drawn within a container, which makes it visually different from other schemas, but it behaves the same.
The schema above specifies a property 'AnArrayOfStrings', which is an array of strings, the Contains rules specifies that at least one item in the array must be the string "My Required Value".
In this example "MyObject" is describes an object that can contain string properties with any name. The Property Names rules imposes a limitation on the property names, specifying that they must match the Pattern (regular expression) "VAL_\d+".
The schema describes a property called "Value" which can contain a string or a Number.
If the value in the instance document is an integer, then the rules in the Then are applied meaning it must be in the range 0-9999.
If the value is not an integer then the rules in the Else are applied and the value must be a string 1-4 chars long matching the regex pattern "\d+".