{
"title": "A Statamic Blueprint JSON Schema",
"$id": "https://arroba-it.de/statamic.blueprint.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"oneOf": [
{
"required": [
"tabs"
]
},
{
"required": [
"sections"
]
}
],
"properties": {
"title": {
"type": "string"
},
"tabs": {
"title": "The Tabs",
"description": "At its most basic, a blueprint has tabs. A tab has a handle, a display name, and an array of sections. Since Statamic 4",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z_]+?$": {
"description": "The handle (name) of a section. This one is on you.",
"type": "object",
"properties": {
"display": {
"description": "The displayed text.",
"type": "string"
},
"sections": {
"description": "The Sections of the Tab",
"type": "array",
"items": {
"type": "object",
"properties": {
"display": {
"description": "The displayed text.",
"type": "string"
},
"instructions": {
"description": "Some instructions",
"type": "string"
},
"fields": {
"$ref": "#/$defs/fields"
}
}
},
"additionalItems": false
}
}
}
}
},
"sections": {
"title": "The Sections",
"description": "At its most basic, a blueprint has sections. A section has a handle, a display name, and an array of fields. Until Statamic 3",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Za-z]+?$": {
"description": "The handle (name) of a section. This one is on you.",
"type": "object",
"properties": {
"display": {
"description": "The displayed text.",
"type": "string"
},
"fields": {
"$ref": "#/$defs/fields"
}
}
}
}
}
},
"$defs": {
"fields": {
"description": "Here you define the fields of this section.",
"type": "array",
"uniqueItems": true,
"uniqueItemProperties": [
"handle"
],
"items": {
"type": "object",
"properties": {
"handle": {
"type": "string",
"description": "The field's template variable."
},
"config": {
"type": "object",
"properties": {
"display": {
"type": "string"
}
}
},
"import": {
"type": "string"
},
"prefix": {
"type": "string"
},
"field": {
"description": "The definition of a single field.",
"type": [
"object",
"string"
],
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/array"
},
{
"$ref": "#/$defs/assets"
},
{
"$ref": "#/$defs/bard"
},
{
"$ref": "#/$defs/button_group"
},
{
"$ref": "#/$defs/checkboxes"
},
{
"$ref": "#/$defs/code"
},
{
"$ref": "#/$defs/collections"
},
{
"$ref": "#/$defs/color"
},
{
"$ref": "#/$defs/date"
},
{
"$ref": "#/$defs/entries"
},
{
"$ref": "#/$defs/form"
},
{
"$ref": "#/$defs/group"
},
{
"$ref": "#/$defs/grid"
},
{
"$ref": "#/$defs/hidden"
},
{
"$ref": "#/$defs/html"
},
{
"$ref": "#/$defs/integer"
},
{
"$ref": "#/$defs/link"
},
{
"$ref": "#/$defs/list"
},
{
"$ref": "#/$defs/markdown"
},
{
"$ref": "#/$defs/radio"
},
{
"$ref": "#/$defs/range"
},
{
"$ref": "#/$defs/replicator"
},
{
"$ref": "#/$defs/revealer"
},
{
"$ref": "#/$defs/section"
},
{
"$ref": "#/$defs/select"
},
{
"$ref": "#/$defs/sites"
},
{
"$ref": "#/$defs/slug"
},
{
"$ref": "#/$defs/structures"
},
{
"$ref": "#/$defs/table"
},
{
"$ref": "#/$defs/taxonomies"
},
{
"$ref": "#/$defs/taggable"
},
{
"$ref": "#/$defs/template"
},
{
"$ref": "#/$defs/terms"
},
{
"$ref": "#/$defs/text"
},
{
"$ref": "#/$defs/textarea"
},
{
"$ref": "#/$defs/time"
},
{
"$ref": "#/$defs/toggle"
},
{
"$ref": "#/$defs/user_groups"
},
{
"$ref": "#/$defs/user_roles"
},
{
"$ref": "#/$defs/users"
},
{
"$ref": "#/$defs/video"
},
{
"$ref": "#/$defs/yaml"
}
],
"required": [
"type"
]
}
},
"dependentRequired": {
"field": [
"handle"
]
}
}
},
"array": {
"description": "This fieldtype is used to manage key: value array data in the right situation.",
"type": "object",
"properties": {
"display": {
"$ref": "#/$defs/display"
},
"icon": {
"$ref": "#/$defs/icon"
},
"instructions": {
"$ref": "#/$defs/instructions"
},
"instructions_position": {
"$ref": "#/$defs/instructions_position"
},
"listable": {
"$ref": "#/$defs/listable"
},
"required": {
"$ref": "#/$defs/required"
},
"localizable": {
"$ref": "#/$defs/localizable"
},
"validate": {
"$ref": "#/$defs/validate"
},
"type": {
"const": "array"
},
"mode": {
"type": "string",
"enum": [
"dynamic",
"keyed"
]
},
"keys": {
"type": [
"object",
"array"
]
},
"value_header": {
"type": "string"
},
"key_header": {
"type": "string"
}
},
"additionalProperties": true
},
"assets": {
"description": "The assets fieldtype is used to manage and relate files with your entries.",
"type": "object",
"properties": {
"type": {
"const": "assets"
},
"mode": {
"type": "string",
"enum": [
"grid",
"list"
],
"default": "list"
},
"container": {
"type": "string"
},
"folder": {
"type": "string"
},
"restrict": {
"type": "boolean",
"default": false
},
"allow_uploads": {
"type": "boolean",
"default": true
},
"show_filename": {
"type": "boolean",
"default": true
},
"max_files": {
"type": "integer"
}
},
"additionalProperties": true
},
"bard": {
"description": "Bard is our recommended fieldtype for creating long form content from the control panel.",
"type": "object",
"properties": {
"type": {
"const": "bard"
},
"always_show_set_button": {
"description": "Enable to always show the \"Add Set\" button.",
"type": "boolean",
"default": false
},
"sets": {
"description": "Sets are configurable blocks of fields that can be inserted anywhere in your Bard content.",
"type": "object"
},
"buttons": {
"description": "Choose which buttons to show in the toolbar.",
"type": "array",
"items": {
"type": "string",
"uniqueItems": true,
"enum": [
"h2",
"h3",
"bold",
"italic",
"unorderedlist",
"orderedlist",
"removeformat",
"quote",
"anchor",
"image",
"table"
]
}
},
"container": {
"description": "Choose which asset container to use for this field.",
"type": "string"
},
"save_html": {
"description": "Save HTML instead of structured data. This simplifies but limits control of your template markup.",
"type": "boolean",
"default": false
},
"toolbar_mode": {
"description": "Choose which style of toolbar you prefer.",
"type": "string",
"enum": [
"fixed",
"floating"
],
"default": "fixed"
},
"link_noopener": {
"description": "Set rel=\"noopener\" on all links.",
"type": "boolean",
"default": false
},
"link_noreferrer": {
"description": "Set rel=\"noreferrer\" on all links.",
"type": "boolean",
"default": false
},
"target_blank": {
"description": "Set target=\"_blank\" on all links.",
"type": "boolean",
"default": false
},
"link_collections": {
"description": "Entries from these collections will be available in the link selector. Leaving this empty will make all entries available.",
"type": "array",
"items": {
"type": "string"
}
},
"reading_time": {
"description": "Show estimated reading time at the bottom of the field.",
"type": "boolean",
"default": false
},
"fullscreen": {
"description": "Enable to toggle into fullscreen mode.",
"type": "boolean",
"default": true
},
"allow_source": {
"description": "Allow Source Mode",
"type": "boolean",
"default": true
},
"enable_input_rules": {
"description": "Enable Input Rules",
"type": "boolean",
"default": true
},
"enable_paste_rules": {
"description": "Enables Markdown-style shortcuts when typing content.",
"type": "boolean",
"default": true
},
"display": {
"$ref": "#/$defs/display"
},
"instructions": {
"$ref": "#/$defs/instructions"
},
"instructions_position": {
"$ref": "#/$defs/instructions_position"
},
"listable": {
"$ref": "#/$defs/listable"
},
"required": {
"$ref": "#/$defs/required"
},
"localizable": {
"$ref": "#/$defs/localizable"
},
"validate": {
"$ref": "#/$defs/validate"
}
},
"additionalProperties": true
},
"button_group": {
"description": "The button group fieldtype is a multiple choice input where you only get one choice.",
"type": "object",
"properties": {
"type": {
"const": "button_group"
},
"options": {
"description": "Set the array keys and their optional labels.",
"type": [
"object",
"array"
]
},
"default": {
"description": "Set the default value.",
"type": "string"
}
},
"additionalProperties": true
},
"checkboxes": {
"description": "The checkboxes fieldtype is a multiple choice input.",
"type": "object",
"properties": {
"type": {
"const": "checkboxes"
},
"inline": {
"type": "boolean",
"default": "false"
},
"options": {
"type": [
"object",
"array"
]
},
"default": {
"type": "string"
}
},
"additionalProperties": true
},
"code": {
"description": "If your content involves code snippets, this is the fieldtype for you.",
"type": "object",
"properties": {
"type": {
"const": "code"
},
"theme": {
"description": "Choose your preferred theme.",
"type": "string",
"enum": [
"light",
"material"
]
},
"mode": {
"description": "Choose language for syntax highlighting.",
"type": "string",
"enum": [
"clike",
"css",
"diff",
"go",
"haml",
"handlebars",
"htmlmixed",
"less",
"markdown",
"gfm",
"nginx",
"text/x-java",
"javascript",
"jsx",
"text/x-objectivec",
"php",
"python",
"ruby",
"scss",
"shell",
"sql",
"twig",
"vue",
"xml",
"yaml-frontmatter"
]
},
"indent_type": {
"description": "Set your preferred type of indentation.",
"type": "string",
"enum": [
"tabs",
"spaces"
]
},
"indent_size": {
"description": "Set your preferred indentation size (in spaces).",
"type": "integer",
"default": 4
},
"key_map": {
"description": "Choose preferred set of keyboard shortcuts.",
"type": "string",
"default": "default",
"enum": [
"default",
"sublime",
"vim"
]
},
"line_numbers": {
"description": "Show Line Numbers",
"type": "boolean",
"default": true
},
"line_wrapping": {
"description": "Enable Line Wrapping",
"type": "boolean",
"default": true
}
},
"additionalProperties": true
},
"collections": {
"description": "This fieldtype is used to view and select from a list of Collections.",
"type": "object",
"properties": {
"type": {
"const": "collections"
},
"max_items": {
"description": "Set a maximum number of selectable items.",
"type": "integer"
},
"mode": {
"description": "Choose your preferred UI style.",
"$ref": "#/$defs/userSelectModes"
}
},
"additionalProperties": true
},
"color": {
"description": "This fieldtype is a highly configurable color picker with simple and advanced UI modes, support for alpha channel, rgba, hsla, hsva, and more.",
"type": "object",
"properties": {
"type": {
"const": "color"
},
"swatches": {
"description": "Pre-define colors that can be selected from a list. Supports all color mode formats.",
"type": "array",
"uniqueItems": true
},
"theme": {
"description": "Choose between a classic and a simpler nano (mini) theme. Default: classic.",
"type": "string",
"enum": [
"classic",
"nano"
]
},
"lock_opacity": {
"description": "Disables the alpha slider, preventing adjustments to opacity.",
"type": "boolean",
"default": false
},
"default_color_mode": {
"description": "Set which color mode you wish to be the default. Default: hex.",
"type": "string",
"default": "HEXA",
"enum": [
"HEXA",
"RGBA",
"HSLA",
"HSVA",
"CMYK"
]
},
"color_modes": {
"description": "Choose which color modes you want to enable in the UI. Available choices: hex, rgba, hsla, hsva, and cmyk. Default: hex.",
"type": "array",
"uniqueItems": true,
"default": "hex",
"items": {
"type": "string",
"enum": [
"hex",
"rgba",
"hsla",
"hsva",
"cmyk"
]
}
}
},
"additionalProperties": true
},
"date": {
"description": "Work with dates, times, and ranges with a variety of user interface options that make you really enjoy basically just picking numbers from a table.",
"type": "object",
"properties": {
"columns": {
"type": "integer",
"description": "Show multiple months at one time, in columns and rows. Default: 1.",
"minimum": 1,
"default": 1
},
"earliest_date": {
"oneOf": [
{
"format": "date"
},
{
"format": "date-time"
}
],
"type": "string",
"default": "1900-01-01",
"description": "Set the earliest selectable date in YYYY-MM-DD format."
},
"format": {
"type": "string",
"description": "How the date should be stored, using the PHP date format. Default: 'Y-m-d' or 'Y-m-d H:m'",
"default": "'Y-m-d'"
},
"full_width": {
"type": "boolean",
"description": "Enable to stretch the calendar out like Stretch Armstrong, using the maximum amount of available horizontal space. Default: false",
"default": false
},
"icon": {
"type": "string"
},
"inline": {
"type": "boolean",
"description": "Always show the calendar instead of the text input and dropdown UI. Default: false.",
"default": false
},
"mode": {
"type": "string",
"description": "Choose between single or range. Range mode disables the time picker. Default: single.",
"enum": [
"single",
"range"
],
"default": "single"
},
"rows": {
"type": "integer",
"description": "Show multiple months at one time, in columns and rows. Default: 1.",
"minimum": 1,
"default": 1
},
"time_enabled": {
"type": "boolean",
"description": "Enable/disable the timepicker. Default: false.",
"default": false
},
"time_required": {
"type": "boolean",
"description": "Makes the time field visible and non-dismissible. Default: false.",
"default": false
},
"type": {
"type": "string",
"const": "date"
}
},
"additionalProperties": true
},
"entries": {
"description": "",
"type": "object",
"properties": {
"type": {
"const": "entries"
},
"max_items": {
"$ref": "#/$defs/max_items"
},
"mode": {
"$ref": "#/$defs/userSelectModes"
},
"create": {
"type": "boolean",
"default": true
},
"collections": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"additionalProperties": true
},
"form": {
"description": "The Form fieldtype is gives your users a way to pick a form to include along with the current entry.",
"type": "object",
"properties": {
"type": {
"const": "form"
},
"placeholder": {
"$ref": "#/$defs/placeholder"
},
"max_items": {
"type": "integer",
"default": 1
}
},
"additionalProperties": true
},
"group": {
"description": "The group fieldtype is a simple container that holds additional fields you would like grouped visually as well as under a parent key.",
"type": "object",
"properties": {
"type": {
"const": "group"
},
"fields": {
"description": "A list of fields within the group.",
"type": "array",
"items": {
"type": "object"
}
}
},
"additionalProperties": true
},
"grid": {
"description": "The grid fieldtype is a meta fieldtype, a fieldtype that serves as a container for more fieldtypes.",
"type": "object",
"properties": {
"type": {
"const": "grid"
},
"fields": {
"description": "A list of fields, each of which create their own column.",
"type": "array",
"items": {
"type": "object"
}
},
"mode": {
"description": "The Grid is displayed as a table by default. If you have a large number of columns it can get pretty crowded. Choose stacked mode to group rows similar to Replicator. When Sneak Peek is enabled, Grids automatically toggle into stacked mode.",
"type": "string",
"enum": [
"table",
"stacked"
]
},
"min_rows": {
"description": "The minimum number of required rows.",
"type": "integer",
"minimum": 0
},
"max_rows": {
"description": "The maximum number of rows allowed. Once reached the Add Row button will disappear.",
"type": "integer",
"minimum": 1
},
"add_row": {
"description": "The Add Row button's label.",
"type": "string",
"minimum": 1
},
"reorderable": {
"description": "The minimum number of required rows.",
"type": "boolean",
"default": true
}
},
"additionalProperties": true
},
"hidden": {
"description": "The hidden field is perfect for setting default data when creating new entries.",
"type": "object",
"properties": {
"type": {
"const": "hidden"
},
"default": {
"type": "string"
}
},
"additionalProperties": true
},
"html": {
"description": "If you've ever wanted to add a little HTML to your blueprint, this is the way to do it.",
"type": "object",
"properties": {
"type": {
"const": "html"
},
"html": {
"description": "Store whatever HTML you want — it's up to you.",
"type": [
"string"
]
}
},
"additionalProperties": true
},
"import": {
"description": "Importing Fieldsets. They serve to create reusable sets of fields, just like v2.",
"type": "string"
},
"integer": {
"description": "The integer fieldtype is a text-style input that only accepts integers (numbers) and has increment and decrement controls.",
"type": "object",
"properties": {
"type": {
"const": "integer"
},
"default": {
"type": [
"string",
"integer"
]
}
},
"additionalProperties": true
},
"link": {
"description": "For when you want to create a link to a URL or entry, this fieldtype is here for you.",
"type": "object",
"properties": {
"type": {
"const": "link"
},
"collections": {
"type": "array"
}
},
"additionalProperties": true
},
"list": {
"description": "For when you want to manage a simple YAML list, this fieldtype is here for you.",
"type": "object",
"properties": {
"type": {
"const": "list"
},
"default": {
"type": "array"
}
},
"additionalProperties": true
},
"markdown": {
"description": "Write Markdown with the help of formatting buttons, assets integration, fullscreen mode, a Markdown cheatsheet, and HTML preview mode.",
"type": "object",
"properties": {
"type": {
"const": "markdown"
},
"container": {
"description": "Set the name of an asset container to enable browsing, uploading, and inserting assets.",
"type": "string"
},
"restrict": {
"description": "If true, navigation within the asset browser will be disabled. Your users will be restricted to specified the container and folder. Default: false.",
"type": "boolean",
"default": false
},
"automatic_line_breaks": {
"description": "Automatically convert line breaks to
tags. Default: true.",
"type": "boolean",
"default": true
},
"automatic_links": {
"description": "Automatically links any URLs in the text. Default: false.",
"type": "boolean",
"default": false
},
"escape_markup": {
"description": "Escapes inline HTML markup. For example,