genroc

    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.

    KeywordValueMeaning
    descriptionstringFree text. Shown in the editor, and never a constraint.
    $refstringA reference to another schema, as #/$defs/<name>.
    typestring|arrayThe value's JSON type, or a list of types it may take.
    oneOfarrayThe value conforms to exactly one of these schemas.
    anyOfarrayThe value conforms to at least one of these schemas.
    enumarrayThe complete set of values allowed here.
    defaultanyThe value used when this one is absent. Annotation only — it does not make a required property optional.
    propertiesobjectThe named members of an object, each a schema.
    requiredarrayWhich properties must be present. A property not listed here may be absent, and reading it yields null.
    additionalPropertiesobjectThe schema undeclared keys conform to, making the object an open map. Omit to close the object: undeclared keys are stripped.
    itemsobjectThe schema every element of an array conforms to.
    minimumnumberSmallest allowed number, inclusive.
    maximumnumberLargest allowed number, inclusive.
    minLengthintegerShortest allowed string.
    maxLengthintegerLongest allowed string.
    minItemsintegerFewest allowed array elements.
    maxItemsintegerMost allowed array elements.
    secretbooleanKeeps the value out of the server's console output. Only valid on a string in a process config_schema.
    $anchorstringA name this schema can be referenced by.
    $idstringAn identifier for this schema.
    $defsobjectNamed schemas this document's $refs resolve against.