{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.designfoundry.app/0.5/foundry-component.schema.json",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "const": "foundry-component/0.5"
    },
    "component": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "displayName": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "structure": true,
    "api": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "props": true,
        "slots": true,
        "events": true,
        "twoWay": true,
        "valueContract": true
      },
      "description": "Props, slots and events."
    },
    "axes": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "values": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "isDefault": {
                  "type": "boolean"
                }
              }
            }
          },
          "bindsContract": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "description": "Variant axes. Each value may be flagged as the axis default."
    },
    "behavior": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "role": {
          "type": [
            "string",
            "null"
          ]
        },
        "focus": {
          "type": [
            "string",
            "null"
          ]
        },
        "focusVisible": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "keyboard": true,
        "ariaBindings": true
      }
    },
    "style": true,
    "states": true
  },
  "description": "An authored component: its API, axes, states, structure, behaviour and style.",
  "required": [
    "schemaVersion"
  ]
}
