{
  "openapi": "3.1.0",
  "info": {
    "title": "Мандат агента — открытые данные",
    "version": "1.0.0",
    "description": "Статические JSON-файлы справочника agent-mandate.ru: статус протоколов платежей ИИ-агентов и формат мандата 0.1. Без ключей и лимитов. CC BY 4.0.",
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    },
    "contact": {
      "email": "info@agent-mandate.ru"
    }
  },
  "servers": [
    {
      "url": "https://agent-mandate.ru"
    }
  ],
  "paths": {
    "/api/v1/protocols.json": {
      "get": {
        "operationId": "listProtocols",
        "summary": "Протоколы платежей ИИ-агентов: кто ведёт, что решает, статус, дата проверки, первоисточник",
        "responses": {
          "200": {
            "description": "Список протоколов",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "checked_at": {
                      "type": "string",
                      "format": "date"
                    },
                    "protocols": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Protocol"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/format/mandate-0.1.schema.json": {
      "get": {
        "operationId": "getMandateSchema",
        "summary": "JSON Schema формата «Мандат агента» 0.1 (черновик)",
        "responses": {
          "200": {
            "description": "JSON Schema 2020-12",
            "content": {
              "application/schema+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/format/mandate-0.1.example.json": {
      "get": {
        "operationId": "getMandateExample",
        "summary": "Пример мандата 0.1",
        "responses": {
          "200": {
            "description": "Пример",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://agent-mandate.ru/format/mandate-0.1.schema.json"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Protocol": {
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "source",
          "checked_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "led_by": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "solves": {
            "type": "string"
          },
          "status": {
            "enum": [
              "launched",
              "pilot",
              "announced"
            ]
          },
          "status_note": {
            "type": "string"
          },
          "stations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string",
            "format": "uri"
          },
          "checked_at": {
            "type": "string",
            "format": "date"
          },
          "page": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  }
}
