docs / Reference / Definition language
JSON Schema
The JSON Schema keywords every schema field accepts. `genctl apply` refuses any other.
Keywords
A subset of JSON Schema, the same in every *_schema field, responses and raises.
| Keyword | Value | Meaning |
|---|---|---|
description | string | Free text. Shown in the editor, and never a constraint. |
$ref | string | A reference to another schema, as #/$defs/<name>. |
type | string|array | The value's JSON type, or a list of types it may take. |
oneOf | array | The value conforms to exactly one of these schemas. |
anyOf | array | The value conforms to at least one of these schemas. |
enum | array | The complete set of values allowed here. |
default | any | The value used when this one is absent. Annotation only — it does not make a required property optional. |
properties | object | The named members of an object, each a schema. |
required | array | Which properties must be present. A property not listed here may be absent, and reading it yields null. |
additionalProperties | object | The schema undeclared keys conform to, making the object an open map. Omit to close the object: undeclared keys are stripped. |
items | object | The schema every element of an array conforms to. |
minimum | number | Smallest allowed number, inclusive. |
maximum | number | Largest allowed number, inclusive. |
minLength | integer | Shortest allowed string. |
maxLength | integer | Longest allowed string. |
minItems | integer | Fewest allowed array elements. |
maxItems | integer | Most allowed array elements. |
secret | boolean | Keeps the value out of the server's console output. Only valid on a string in a process config_schema. |
$anchor | string | A name this schema can be referenced by. |
$id | string | An identifier for this schema. |
$defs | object | Named schemas this document's $refs resolve against. |