{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openvisual.org/schema/scotoma/1.0",
  "title": "OVS: Scotoma",
  "description": "Localized area of reduced or absent vision. Occurs in AMD, glaucoma, migraine aura, and VSS.",
  "allOf": [
    { "$ref": "https://openvisual.org/schema/symptom-base/1.0" },
    {
      "type": "object",
      "required": ["count", "positions"],
      "properties": {
        "ovs_type":   { "const": "ovs:scotoma" },
        "opacity":    { "type": "number", "minimum": 0, "maximum": 1, "description": "Scotoma fill density" },
        "count":      { "type": "integer", "minimum": 1, "description": "Number of simultaneous scotomas" },
        "positions": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["x", "y"],
            "properties": {
              "x": { "type": "number", "minimum": 0, "maximum": 1 },
              "y": { "type": "number", "minimum": 0, "maximum": 1 }
            }
          },
          "description": "Center positions in visual field, normalized 0–1"
        },
        "color_rgba": { "type": "string", "description": "Fill color — typically black (#000000)" }
      }
    }
  ]
}
