Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Latest commit

 

History

History
22 lines (18 loc) · 2.32 KB

working-with-json-schema-keywords.md

File metadata and controls

22 lines (18 loc) · 2.32 KB

Working with JSON Schema keywords

There are various keywords available to use in your content schema. Some of the keywords listed below have been used in our more complex schemas.

Keyword Explanation
type The data type of a schema
required Specify object-level properties that must exist - by default all object properties are optional
enum To specify values a request parameter or model property can accept
oneOf, anyOf, allOf These allow you to validate the use of other subschemas in your schema
$ref To include a subschema within your schema. It can be either a relative or absolute URI
additionalProperties Controls whether properties that are not already specified can be accepted. By default any additional properties are allowed