{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Deck or preset field definition",
  "type": "object",
  "additionalProperties": true,
  "required": ["name", "side", "type"],
  "properties": {
    "id": {
      "description": "Required for deck fields and referenced preset fields. Unreferenced preset fields may omit id to generate an identity during import. Supplied ids must be nonempty strings, unique within the owner; null is invalid.",
      "type": "string",
      "minLength": 1
    },
    "name": { "type": "string", "minLength": 1, "maxLength": 30 },
    "side": { "enum": ["front", "back", "both", "note"] },
    "type": {
      "enum": [
        "text",
        "rich_text",
        "image",
        "cloze",
        "tts",
        "audio",
        "image_occlusion",
        "chinese",
        "japanese",
        "code",
        "tex"
      ]
    },
    "generalSettings": { "$ref": "general_settings.schema.json" },
    "settings": { "$ref": "field_settings.schema.json" }
  }
}
