The JSON Schema standard is extensive and descriptive, but it can lead to taking too much time to quickly find the name of a property, etc.
I decided to generate a list of important JSON Schema properties so they can be easy to find when needed.
The following was generated using Bard AI, and seems to be accurate.
—
Please provide a list of all known standardized properties in jsonschema with the property name, followed by a colon + space delimiter, and the followed by a description of the property. Each should be on one new line.
—
The following is a list of all known standardized properties in JSON Schema, with the property name, followed by a colon + space delimiter, and then followed by a description of the property, each on a new line:
- $schema: The URI of the JSON Schema version used to define the schema.
- $ref: A reference to another JSON Schema that defines the schema for this object.
- $id: A unique identifier for the schema.
- title: A human-readable title for the schema.
- description: A human-readable description of the schema.
- type: The data type of the value that the schema validates.
- enum: An array of valid values for the schema.
- const: A constant value that the schema validates.
- multipleOf: A number that the value must be divisible by.
- maximum: The maximum value that the schema validates.
- exclusiveMaximum: A boolean value indicating whether the maximum value is exclusive or inclusive.
- minimum: The minimum value that the schema validates.
- exclusiveMinimum: A boolean value indicating whether the minimum value is exclusive or inclusive.
- maxLength: The maximum length of a string that the schema validates.
- minLength: The minimum length of a string that the schema validates.
- pattern: A regular expression that the value must match.
- maxItems: The maximum number of items in an array that the schema validates.
- minItems: The minimum number of items in an array that the schema validates.
- uniqueItems: A boolean value indicating whether the items in an array must be unique.
- maxProperties: The maximum number of properties in an object that the schema validates.
- minProperties: The minimum number of properties in an object that the schema validates.
- required: An array of property names that must be present in an object that the schema validates.
- dependentRequired: An object mapping property names to arrays of property names. If a property that is present in the first array is present in the object, then all of the properties in the second array must also be present.
- additionalProperties: A boolean value indicating whether additional properties are allowed in an object that the schema validates.
- properties: An object mapping property names to JSON Schemas that define the schemas for those properties.
- patternProperties: An object mapping regular expressions to JSON Schemas that define the schemas for properties that match those regular expressions.
- allOf: An array of JSON Schemas that the value must validate against.
- anyOf: An array of JSON Schemas that the value must validate against at least one of.
- oneOf: An array of JSON Schemas that the value must validate against exactly one of.
- not: A JSON Schema that the value must not validate against.
Please note that this list is not exhaustive, and there may be other standardized properties in JSON Schema that are not listed here.
—