Document schema
Document: { meta?: object, blocks: Block[] } — nesting depth is capped at 20 levels.
Block (additionalProperties: false — exactly these keys):
| Key | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
type | string | yes | — pattern ^[a-z0-9_-]+$ |
enabled | boolean | yes | |
data | object | yes | |
settings | object | yes | |
visibility | object | yes | |
children | array | yes |
Visibility: { from: string|null, until: string|null, sites: (int|string)[]|null } — all three keys required.
json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://www.renick.io/docs/content-plugin/schema/document-v1.json",
"title": "Renick.Content document (v1)",
"description": "A block-based content document as stored by the contenteditor field. Nesting depth is additionally capped at 20 levels (not expressible in JSON Schema).",
"type": "object",
"properties": {
"meta": {
"type": "object"
},
"blocks": {
"type": "array",
"items": {
"$ref": "#/definitions/block"
}
}
},
"required": [
"blocks"
],
"additionalProperties": false,
"definitions": {
"block": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"pattern": "^[a-z0-9_-]+$"
},
"enabled": {
"type": "boolean"
},
"data": {
"type": "object"
},
"settings": {
"type": "object"
},
"visibility": {
"type": "object",
"properties": {
"from": {
"type": [
"string",
"null"
]
},
"until": {
"type": [
"string",
"null"
]
},
"sites": {
"type": [
"array",
"null"
],
"items": {
"type": [
"integer",
"string"
]
}
}
},
"required": [
"from",
"until",
"sites"
],
"additionalProperties": false
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/block"
}
}
},
"required": [
"id",
"type",
"enabled",
"data",
"settings",
"visibility",
"children"
],
"additionalProperties": false
}
}
}