{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vedarai-ru/json-schema/vedarai-ru-safety-status-response-schema.json",
  "title": "SafetyStatusResponse",
  "description": "Всегда 200. При недоступном источнике — data.unavailable: true и нули; клиент обязан проверять unavailable, а не читать нули как «тихо».",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vedarai-ru-openapi.yml#/components/schemas/SafetyStatusResponse",
  "type": "object",
  "required": [
    "success",
    "data"
  ],
  "properties": {
    "success": {
      "const": true
    },
    "data": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "hasAlert",
            "maxSeverity",
            "activeCount",
            "source"
          ],
          "properties": {
            "hasAlert": {
              "type": "boolean"
            },
            "maxSeverity": {
              "type": "number"
            },
            "activeCount": {
              "type": "integer"
            },
            "topTitle": {
              "type": [
                "string",
                "null"
              ]
            },
            "topType": {
              "type": [
                "string",
                "null"
              ]
            },
            "dataUpdatedAt": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "type": "string"
            },
            "feedCount": {
              "type": [
                "integer",
                "null"
              ]
            },
            "feedTitles": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "type": "string"
              }
            },
            "feedBasis": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "recognized": {
                    "type": "boolean"
                  }
                }
              }
            },
            "feedZones": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        {
          "type": "object",
          "required": [
            "unavailable",
            "hasAlert",
            "maxSeverity",
            "activeCount",
            "source"
          ],
          "properties": {
            "unavailable": {
              "const": true
            },
            "hasAlert": {
              "const": false
            },
            "maxSeverity": {
              "const": 0
            },
            "activeCount": {
              "const": 0
            },
            "topTitle": {
              "type": "null"
            },
            "topType": {
              "type": "null"
            },
            "dataUpdatedAt": {
              "type": "null"
            },
            "source": {
              "type": "string"
            }
          }
        }
      ]
    }
  }
}