{
  "openapi": "3.1.0",
  "info": {
    "title": "diff.legal — публичный каталог услуг",
    "description": "Публичный каталог и подход diff.legal. Те же сведения отдают MCP https://diff.legal/mcp/ и A2A https://diff.legal/a2a; submit_enquiry принимает обращение только после явного подтверждения человеком. Каноническая справка: https://diff.legal/for-llms.html, полный дайджест: https://diff.legal/llms-full.txt. Каждый ответ несёт поле revision — версию сведений каталога.",
    "version": "1.0.0"
  },
  "servers": [
    { "url": "https://diff.legal" }
  ],
  "paths": {
    "/api/services": {
      "get": {
        "summary": "Каталог услуг с результатом, составом и границами",
        "operationId": "listServices",
        "responses": {
          "200": {
            "description": "Каталог из пяти услуг",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Catalog" }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/api/services/{service_id}": {
      "get": {
        "summary": "Услуга по идентификатору каталога",
        "operationId": "getService",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "enum": ["deals", "ai-ip", "assets", "disputes", "support"] }
          }
        ],
        "responses": {
          "200": {
            "description": "Сведения об услуге",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Service" }
              }
            }
          },
          "404": { "description": "unknown_service" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/api/approach": {
      "get": {
        "summary": "Как устроена работа фирмы: четыре принципа, утверждения и способ проверки",
        "operationId": "getApproach",
        "responses": {
          "200": {
            "description": "Позиционирование, пункты подхода и список того, чего фирма не обещает",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Approach" }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    }
  },
  "components": {
    "responses": {
      "RateLimited": {
        "description": "Общий бюджет запросов клиента за 60 секунд исчерпан; повторите позже по заголовку Retry-After"
      }
    },
    "schemas": {
      "Revision": { "type": "string", "description": "Версия сведений каталога, например 2026-09-16-3" },
      "Service": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "enum": ["deals", "ai-ip", "assets", "disputes", "support"] },
          "name": { "type": "string" },
          "summary": { "type": "string" },
          "deliverables": { "type": "array", "items": { "type": "string" } },
          "included": { "type": "array", "items": { "type": "string" } },
          "excluded": { "type": "array", "items": { "type": "string" } },
          "pricing": { "type": "string", "description": "Порядок определения стоимости, без числовых цен" },
          "timing": { "type": "string", "description": "Порядок определения срока, без числовых сроков" },
          "handoff_url": { "type": "string" },
          "revision": { "$ref": "#/components/schemas/Revision" }
        }
      },
      "Catalog": {
        "type": "object",
        "properties": {
          "services": { "type": "array", "items": { "$ref": "#/components/schemas/Service" } },
          "revision": { "$ref": "#/components/schemas/Revision" }
        }
      },
      "ApproachPoint": {
        "type": "object",
        "properties": {
          "aspect": { "type": "string" },
          "claim": { "type": "string" },
          "evidence": { "type": "string", "description": "Как проверить утверждение" },
          "common_practice": { "type": "string" }
        }
      },
      "Approach": {
        "type": "object",
        "properties": {
          "positioning": { "type": "string" },
          "points": { "type": "array", "items": { "$ref": "#/components/schemas/ApproachPoint" } },
          "not_promises": { "type": "array", "items": { "type": "string" } },
          "handoff_url": { "type": "string" },
          "revision": { "$ref": "#/components/schemas/Revision" }
        }
      }
    }
  }
}
