{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/raiffeisen-ru/main/json-schema/raiffeisen-ru-product-news-v2-resource-schema.json",
  "title": "ProductNewsV2Resource",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/raiffeisen-ru-content-product-news-openapi.yml#/components/schemas/ProductNewsV2Resource",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id контента"
    },
    "cnums": {
      "type": "array",
      "description": "Список CNUM (уникальный идентификатор клиента в банке), для которой предназначена новость",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "new": {
      "type": "boolean",
      "description": "Статус прочитанности"
    },
    "status": {
      "type": "string",
      "description": "Статус публикации",
      "enum": [
        "SCHEDULED",
        "PUBLISHED"
      ]
    },
    "title": {
      "type": "string",
      "description": "Заголовок новости"
    },
    "subtitle": {
      "type": "string",
      "description": "Подзаголовок новости"
    },
    "publishDate": {
      "type": "string",
      "format": "date-time",
      "description": "Дата публикации"
    },
    "media": {
      "$ref": "#/$defs/ProductNewsMediaResource",
      "description": "Информация о медиа"
    },
    "style": {
      "$ref": "#/$defs/ColorStyleOpenApi",
      "description": "Информация о цвете для новости"
    },
    "slides": {
      "type": "array",
      "description": "Слайды новости",
      "items": {
        "$ref": "#/$defs/ProductNewsSlideResource"
      }
    }
  },
  "required": [
    "cnums",
    "media",
    "new",
    "publishDate",
    "slides",
    "status",
    "style",
    "subtitle",
    "title"
  ],
  "$defs": {
    "ButtonResource": {
      "type": "object",
      "description": "",
      "properties": {
        "label": {
          "type": "string",
          "description": "Название кнопки"
        },
        "url": {
          "type": "string",
          "description": "URL адрес, на который ссылается кнопка"
        }
      },
      "required": [
        "label",
        "url"
      ]
    },
    "ColorStyleOpenApi": {
      "type": "object",
      "description": "",
      "properties": {
        "backgroundColor": {
          "type": "string",
          "description": "Цвет слайдов"
        },
        "contentBackgroundColor": {
          "type": "string",
          "description": "Цвет фона для текста"
        },
        "accentColor": {
          "type": "string",
          "description": "Цвет текста"
        }
      },
      "required": [
        "accentColor",
        "backgroundColor",
        "contentBackgroundColor"
      ]
    },
    "ContactFormResource": {
      "type": "object",
      "description": "",
      "properties": {
        "label": {
          "type": "string",
          "description": "Заголовок для контактной формы"
        }
      },
      "required": [
        "label"
      ]
    },
    "ProductNewsMediaResource": {
      "type": "object",
      "description": "",
      "properties": {
        "url": {
          "type": "string",
          "description": "Ссылка для скачивания"
        },
        "type": {
          "type": "string",
          "description": "Тип медиа",
          "enum": [
            "IMAGE"
          ]
        }
      },
      "required": [
        "type",
        "url"
      ]
    },
    "ProductNewsSlideResource": {
      "type": "object",
      "description": "",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id контента"
        },
        "body": {
          "type": "string",
          "description": "Текст слайда"
        },
        "button": {
          "$ref": "#/$defs/ButtonResource",
          "description": "Информация о кнопке"
        },
        "order": {
          "type": "integer",
          "format": "int64",
          "description": "Номер порядка слайда"
        },
        "contactForm": {
          "$ref": "#/$defs/ContactFormResource",
          "description": "Информация для контактной формы"
        }
      },
      "required": [
        "body",
        "order"
      ]
    }
  }
}