{
 "openapi": "3.1.0",
 "info": {
  "title": "Машиночитаемость — API глоссария",
  "version": "1.0.0",
  "description": "Справочный сайт о машиночитаемости информации. Единственный метод отдаёт глоссарий: 25 терминов с определениями, источниками и ссылками. Данные статические, обновляются вместе с сайтом. Коммерческих методов нет: сайт не продаёт услуг.",
  "contact": {
   "name": "ООО «САРМАТЕХ»",
   "email": "info@machine-readable.ru",
   "url": "https://machine-readable.ru/"
  },
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  }
 },
 "servers": [
  {
   "url": "https://machine-readable.ru"
  }
 ],
 "paths": {
  "/api/v1/terms.json": {
   "get": {
    "operationId": "getTerms",
    "summary": "Глоссарий машиночитаемости целиком",
    "description": "Все термины глоссария одним файлом JSON. Фильтров нет; для одного термина возьмите элемент массива terms по полю id (совпадает с якорем на странице глоссария).",
    "responses": {
     "200": {
      "description": "Глоссарий",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Glossary"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Glossary": {
    "type": "object",
    "required": [
     "name",
     "terms",
     "license"
    ],
    "properties": {
     "name": {
      "type": "string"
     },
     "url": {
      "type": "string",
      "format": "uri"
     },
     "license": {
      "type": "string",
      "format": "uri"
     },
     "licenseName": {
      "type": "string"
     },
     "attribution": {
      "type": "string",
      "description": "Как указывать источник при использовании"
     },
     "inLanguage": {
      "type": "string"
     },
     "dateModified": {
      "type": "string",
      "format": "date"
     },
     "count": {
      "type": "integer"
     },
     "terms": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Term"
      }
     }
    }
   },
   "Term": {
    "type": "object",
    "required": [
     "id",
     "name",
     "definition",
     "url"
    ],
    "properties": {
     "id": {
      "type": "string",
      "description": "Код термина, латиницей; якорь на странице глоссария"
     },
     "name": {
      "type": "string"
     },
     "kind": {
      "type": "string",
      "description": "Статус определения: определение сайта, закреплено в законе, близкое понятие в законе и т. п."
     },
     "definition": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Абзацы определения по порядку"
     },
     "source": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "title": {
        "type": "string"
       },
       "url": {
        "type": "string",
        "format": "uri"
       }
      }
     },
     "seeAlso": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "id связанных терминов"
     },
     "url": {
      "type": "string",
      "format": "uri"
     }
    }
   }
  }
 }
}
