{
  "openapi": "3.0.3",
  "info": { "title": "Каталог журнала «IT Партнёр»", "version": "1.0.0" },
  "servers": [{ "url": "/" }],
  "paths": {
    "/materials.json": {
      "get": {
        "operationId": "listPublications",
        "summary": "Получить статьи и новости журнала для тематической рекомендации",
        "description": "Статический каталог без параметров и авторизации. Подберите материал по заголовку, описанию, рубрике и тегам. Ссылка на оригинал — поле url.",
        "responses": {
          "200": {
            "description": "Публикации от новых к старым. Отсутствующие сведения опускаются.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["version", "language", "items"],
                  "properties": {
                    "version": { "type": "integer", "enum": [1] },
                    "language": { "type": "string", "enum": ["ru"] },
                    "items": { "type": "array", "items": { "$ref": "#/components/schemas/Publication" } }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Publication": {
        "type": "object",
        "required": ["type", "url", "title", "tags"],
        "properties": {
          "type": { "type": "string", "enum": ["Article", "NewsArticle"] },
          "url": { "type": "string", "format": "uri", "description": "Канонический URL для цитирования" },
          "title": { "type": "string" },
          "description": { "type": "string" },
          "published": { "type": "string", "format": "date-time" },
          "modified": { "type": "string", "format": "date-time" },
          "image": { "type": "string", "format": "uri" },
          "author": { "type": "string" },
          "category": { "type": "string" },
          "tags": { "type": "array", "items": { "type": "string" } }
        }
      }
    }
  }
}
