{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "$id": "https://perso.thecardproject.uk/perso-schema/1.0.0.json#manifestSchema",
  "title": "Vibed SVG manifest / PersoFiles v2 design metadata",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "name",
    "description",
    "tags",
    "fields"
  ],
  "properties": {
    "schemaVersion": {
      "const": 2
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "description": {
      "type": "string",
      "maxLength": 2000
    },
    "tags": {
      "type": "array",
      "maxItems": 30,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 50
      }
    },
    "fields": {
      "type": "array",
      "maxItems": 60,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "label",
          "type",
          "required",
          "defaultValue"
        ],
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "type": {
            "enum": [
              "text",
              "image"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "defaultValue": {
            "type": "string",
            "maxLength": 2000,
            "description": "Text sample/default. For images use empty string; optional initial image belongs in SVG href."
          }
        }
      }
    }
  }
}