{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "Photo": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "url",
        "description",
        "group"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "description": "Stable owner-facing photo identity, preserved when reordered or edited."
        },
        "url": {
          "type": "string",
          "description": "Property-owned image URL; existing legacy cover URLs may be retained."
        },
        "description": {
          "type": "string",
          "maxLength": 1000,
          "description": "Accessible image description, empty when unset."
        },
        "group": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 80,
          "description": "Optional normalized group label, null when ungrouped."
        }
      },
      "description": "A saved listing photo with its stable identity and optional group."
    },
    "Response": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "photos"
      ],
      "properties": {
        "photos": {
          "type": "array",
          "maxItems": 10,
          "description": "Photos in display order, first is cover. Empty when none are saved.",
          "items": {
            "$ref": "#/$defs/Photo"
          }
        }
      }
    }
  }
}