Design Format

Variable

One entry of the design's `variables` registry – a template variable's name, the value the design draws now, and how to present it.

Type Information

Base Type: object

Properties

PropertyTypeDescription
namestringVariable name: letters, digits and _, with . between path segments.
labelstringName shown to people.
descriptionstringHelp text for whoever fills the variable.
requiredbooleanA record must supply the value; default does not.
defaultstring | booleanValue used when none is supplied.
valuestring | booleanValue the design draws now.

JSON Schema

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*$",
      "description": "Variable name: letters, digits and `_`, with `.` between path segments."
    },
    "label": {
      "description": "Name shown to people.",
      "type": "string"
    },
    "description": {
      "description": "Help text for whoever fills the variable.",
      "type": "string"
    },
    "required": {
      "description": "A record must supply the value; `default` does not.",
      "type": "boolean"
    },
    "default": {
      "description": "Value used when none is supplied.",
      "type": [
        "string",
        "boolean"
      ]
    },
    "value": {
      "description": "Value the design draws now.",
      "type": [
        "string",
        "boolean"
      ]
    }
  },
  "required": [
    "name"
  ]
}

No related definitions found.

On this page