{"id":370664,"date":"2024-05-21T04:30:30","date_gmt":"2024-05-21T04:30:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=370664"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=370664","title":{"rendered":"<span>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 REST API \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 swagger-typescript-api<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u044f \u043e\u0437\u0430\u0434\u0430\u0447\u0438\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c. \u0410 \u043a\u0442\u043e \u043a\u0430\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 API \u0432 2024 \u0433\u043e\u0434\u0443? \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 Swagger-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0438\u043b\u0438 OpenAPI-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043a\u0430\u043a must have. \u0418 \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u043b\u044e\u0434\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044d\u0442\u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b c REST API. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0441\u0440\u0435\u0434\u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0442\u0430\u043a\u043e\u0432\u044b\u0435 \u0435\u0441\u0442\u044c, \u0438 \u0432\u0430\u043c \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0441\u043a\u0438\u0434\u044b\u0432\u0430\u044e\u0442 \u00ab\u0434\u0442\u043e\u043e\u0448\u043a\u0438\u00bb, \u0442\u043e \u0432\u043f\u0435\u0440\u0435\u0434 \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0442\u044c <a href=\"https:\/\/www.openapis.org\/\" rel=\"noopener noreferrer nofollow\">OpenApi<\/a>.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b <a href=\"https:\/\/www.npmjs.com\/package\/swagger-typescript-api\" rel=\"noopener noreferrer nofollow\">swagger-typescript-api<\/a> \u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0438\u0448\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 OpenAPI. \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u044d\u0442\u0438\u043c, \u043c\u043e\u0433\u0443\u0442 \u0441\u0440\u0430\u0437\u0443 <a href=\"#swagger-typescript-api\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e swagger-typescript-api<\/a>.<\/p>\n<p>\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f OpenAPI \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e API, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0447\u0435\u0440\u0435\u0437 HTTP \u0438\u043b\u0438 HTTP-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b. OpenAPI \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u043a\u0430\u043a \u0440\u044f\u0434 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u0440\u0430\u0437\u0443 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/structure\" rel=\"noopener noreferrer nofollow\">Structure of an OpenAPI Description<\/a>: JSON, YAML,\u00a0openapi\u00a0and\u00a0info<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/paths\" rel=\"noopener noreferrer nofollow\">API Endpoints<\/a>:\u00a0paths\u00a0and\u00a0responses.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/content\" rel=\"noopener noreferrer nofollow\">Content of Message Bodies<\/a>:\u00a0content\u00a0and\u00a0schema.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/parameters\" rel=\"noopener noreferrer nofollow\">Parameters and Payload of an Operation<\/a>:\u00a0parameters\u00a0and\u00a0requestBody.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/components\" rel=\"noopener noreferrer nofollow\">Reusing Descriptions<\/a>:\u00a0components\u00a0and\u00a0$ref.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/servers\" rel=\"noopener noreferrer nofollow\">API Servers<\/a>:\u00a0servers.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u041a\u0430\u0436\u0434\u044b\u0439 OpenAPI-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 JSON-\u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0438 \u0432 JSON-\u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u0442\u0430\u043a \u0438 \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/YAML\" rel=\"noopener noreferrer nofollow\">YAML<\/a>-\u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u042f \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f:<\/p>\n<pre><code class=\"json\">{   \"anObject\": {     \"aNumber\": 42,     \"aString\": \"This is a string\",     \"aBoolean\": true,     \"nothing\": null,     \"arrayOfNumbers\": [       1,       2,       3     ]   } }<\/code><\/pre>\n<pre><code class=\"yaml\"># Anything after a hash sign is a comment anObject:   aNumber: 42   aString: This is a string   aBoolean: true   nothing: null   arrayOfNumbers:     - 1     - 2     - 3 <\/code><\/pre>\n<p>JSON \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442: \u0437\u0430\u043f\u044f\u0442\u044b\u0435, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044f, \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0442\u0440\u043e\u043a \u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432.<\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, YAML \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u0435\u0444\u0438\u0441\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (\u043e\u0442\u0441\u0442\u0443\u043f\u044b \u0432 JSON \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b).<\/p>\n<p>YAML \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438\u0437-\u0437\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0444\u0430\u0439\u043b\u0430, \u043d\u043e \u044d\u0442\u0438 \u0434\u0432\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 OpenAPI-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#openapi-object\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 OpenAPI<\/a>). \u0422\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u043f\u043e\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 OpenAPI \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438: <code>openapi<\/code> \u0438 <code>info<\/code>, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p><code>paths<\/code><\/p>\n<\/li>\n<li>\n<p><code>components<\/code><\/p>\n<\/li>\n<li>\n<p><code>webhooks<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043b\u0435 <code>openapi<\/code>\u00a0(string) \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>3.1.0<\/code>. \u0412 \u043f\u043e\u043b\u0435 <code>info<\/code> (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#info-object\" rel=\"noopener noreferrer nofollow\">Info Object<\/a>) \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 API, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0430\u0432\u0442\u043e\u0440\u0430 \u0438 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <code>title<\/code> (string) \u0438 <code>version<\/code> (string).<\/p>\n<p>\u0410 \u043f\u043e\u043b\u0435 <code>paths<\/code>\u00a0(<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#paths-object\" rel=\"noopener noreferrer nofollow\">Paths Object<\/a>) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435  API Endpoints, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 YAML-\u0444\u043e\u0440\u043c\u0430\u0442\u0435:<\/p>\n<pre><code class=\"yaml\">openapi: 3.1.0 info:   title: A minimal OpenAPI Description   version: 0.0.1 paths: {}  # No endpoints defined<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e API Endpoints (\u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 Operations \u0438\u043b\u0438 Routes). \u041e\u043d\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f Paths \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 OpenAPI. \u041a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u043b\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 Paths \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u0443\u0442\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#path-item-object\" rel=\"noopener noreferrer nofollow\">Path Item Object<\/a>), \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u043e\u0434\u0438\u043d API endpoint.<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043e\u0441\u043e\u0439 \u0447\u0435\u0440\u0442\u044b <code>\/<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a URL-\u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 <a href=\"https:\/\/learn.openapis.org\/examples\/tictactoe.yaml\" rel=\"noopener noreferrer nofollow\">Tic Tac Toe sample API<\/a>:<\/p>\n<pre><code class=\"yaml\">openapi: 3.1.0 info:   title: Tic Tac Toe   description: |     This API allows writing down marks on a Tic Tac Toe board     and requesting the state of the board or of individual squares.   version: 1.0.0 paths:   # Whole board operations   \/board:     get:       summary: Get the whole board       description: Retrieves the current state of the board and the winner.       responses:         \"200\":           description: \"OK\"           content:             ... <\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u0443\u0442\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#path-item-object\" rel=\"noopener noreferrer nofollow\">Path Item Object<\/a>) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 HTTP \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 (EndPoint). \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <code>get<\/code>. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0438\u043c\u0435\u043d\u0430\u043c HTTP-\u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>get<\/code>, <code>put<\/code> \u0438 \u0442.\u0434.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#operation-object\" rel=\"noopener noreferrer nofollow\">Operation Object<\/a>) \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#responses-object\" rel=\"noopener noreferrer nofollow\">Responses Object<\/a>) &#8212; \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432. \u0418\u043c\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432 \u044d\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430 HTTP (\u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e &#171;200&#187;), \u0430 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#response-object\" rel=\"noopener noreferrer nofollow\">Response Object<\/a>), \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0442\u0432\u0435\u0442\u0435.<\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#response-object\" rel=\"noopener noreferrer nofollow\">Response Object<\/a>) \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u0435 <code>description<\/code> \u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0430\u043c\u044b\u043c \u0432\u0430\u0436\u043d\u044b\u043c \u043f\u043e\u043b\u0435\u043c <code>content<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u043b\u0435 <code>content<\/code> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. \u041e\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#response-object\" rel=\"noopener noreferrer nofollow\">Response Object<\/a>), \u0442\u0430\u043a \u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 \u0442\u0435\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#request-body-object\" rel=\"noopener noreferrer nofollow\">Request Body Objects<\/a>) \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 <a href=\"https:\/\/tools.ietf.org\/html\/rfc6838\" rel=\"noopener noreferrer nofollow\">RFC6838 Media Types<\/a> \u0438 OpenAPI\u00a0<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#media-type-object\" rel=\"noopener noreferrer nofollow\">Media Type Objects<\/a>. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043b\u044f <code>content<\/code> \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <code>get<\/code> \u0437\u0430\u043f\u0440\u043e\u0441\u0430 <code>\/board<\/code>:<\/p>\n<pre><code class=\"yaml\">openapi: 3.1.0 info:   title: Tic Tac Toe   description: |     This API allows writing down marks on a Tic Tac Toe board     and requesting the state of the board or of individual squares.   version: 1.0.0 paths:   # Whole board operations   \/board:     get:       summary: Get the whole board       description: Retrieves the current state of the board and the winner.       responses:         \"200\":           description: \"OK\"           content:             application\/json:               schema:                 type: object                 properties:                     winner:                       type: string                       enum: [\".\", \"X\", \"O\"]                       description: |                         Winner of the game. `.` means nobody has won yet.                     board:                       type: array                       maxItems: 3                       minItems: 3                       items:                           type: array                           maxItems: 3                           minItems: 3                           items:                             type: string                             enum: [\".\", \"X\", \"O\"]                             description: |                               Possible values for a board square.                               `.` means empty square.   ...<\/code><\/pre>\n<p><a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#media-type-object\" rel=\"noopener noreferrer nofollow\">Media Type Object<\/a> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u0438\u043f \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 <a href=\"https:\/\/learn.openapis.org\/specification\/docs\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>). \u0414\u043b\u044f \u0442\u0438\u043f\u0430 <code>application\/json<\/code> \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043f\u043e\u043b\u0435 <code>schema<\/code>.<\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 \u0441\u0445\u0435\u043c\u044b (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#schema-object\" rel=\"noopener noreferrer nofollow\">Schema Object<\/a>) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u043c (integer, string, \u2026), \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u044f <code>type<\/code>. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0441\u0432\u043e\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u0438\u043d\u0430 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a \u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438\u043b\u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u0432.<\/p>\n<p>\u041e\u0431 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c. OpenAPI \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0432\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 &#8212; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0442\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430). \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (path parameters \u0438\u043b\u0438 query parameters), \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (body parameters). \u041a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0433\u0447\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<pre><code class=\"yaml\">paths:   # Single square operations   \/board\/{row}\/{column}:     parameters:       - name: row         in: path         required: true         schema:           type: integer           minimum: 1           maximum: 3       - name: column         in: path         required: true         schema:           type: integer           minimum: 1           maximum: 3     get:       summary: Get a single board square       responses:         ...     put:       summary: Set a single board square       requestBody:         required: true         content:           application\/json:             schema:               type: string               enum: [\".\", \"X\", \"O\"]       responses:         ...<\/code><\/pre>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <code>get<\/code> \u0432\u0438\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#parameter-object\" rel=\"noopener noreferrer nofollow\">Parameter Object<\/a>) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438:<\/p>\n<ul>\n<li>\n<p><code>in<\/code> (string) &#8212; \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (path, query \u0438\u043b\u0438 header)<\/p>\n<\/li>\n<li>\n<p><code>name<\/code> (string) &#8212; \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c (\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435)<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f <code>description<\/code> \u0438 <code>required<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0438\u043f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u0445\u0435\u043c\u044b (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#schemaObject\" rel=\"noopener noreferrer nofollow\">Schema Object<\/a>) \u0432 \u043f\u043e\u043b\u0435 <code>schema<\/code>.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,  <code>POST<\/code> \u0438\u043b\u0438 <code>PUT<\/code>, \u043e\u043d\u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 <code>requestBody<\/code>. \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0435\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#request-body-object\" rel=\"noopener noreferrer nofollow\">Request Body Object<\/a>) \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435 &#8212; <code>content<\/code>, \u0442\u043e \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#response-object\" rel=\"noopener noreferrer nofollow\">Response Object<\/a>).<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u043e\u043b\u0435 <code>paths<\/code> \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435 OpenAPI (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#openapi-object\" rel=\"noopener noreferrer nofollow\">OpenAPI Object<\/a>), \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 <code>components<\/code>. \u042d\u0442\u043e \u043f\u043e\u043b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#components-object\" rel=\"noopener noreferrer nofollow\">Components Object<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u0445\u0435\u043c\u044b \u0432 <code>components<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u0445\u043b\u0430\u043c\u043b\u0435\u043d\u0438\u044f. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"yaml\">components:   schemas:     coordinate:       type: integer       minimum: 1       maximum: 3   parameters:     rowParam:       name: row       in: path       required: true       schema:         $ref: \"#\/components\/schemas\/coordinate\"     columnParam:       name: column       in: path       required: true       schema:         $ref: \"#\/components\/schemas\/coordinate\" paths:   \/board\/{row}\/{column}:     parameters:       - $ref: \"#\/components\/parameters\/rowParam\"       - $ref: \"#\/components\/parameters\/columnParam\"<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0437\u0430\u0434\u0430\u043d\u043e \u0434\u0432\u0430 <a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#components-object\" rel=\"noopener noreferrer nofollow\">Components Object<\/a> &#8212; <code>schemas<\/code> \u0438 <code>parameters<\/code>. <code>rowParam<\/code> \u0438 <code>columnParam<\/code> \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c <a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#reference-object\" rel=\"noopener noreferrer nofollow\">Reference Objects<\/a> \u043d\u0430 <code>coordinate<\/code> \u0438\u0437 <code>schemas<\/code>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u0435 <code>servers<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435 OpenAPI (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#openapi-object\" rel=\"noopener noreferrer nofollow\">OpenAPI Object<\/a>), \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u0443\u0442\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#path-item-object\" rel=\"noopener noreferrer nofollow\">Path Item Object<\/a>) \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#operationServers\" rel=\"noopener noreferrer nofollow\">Operation Object<\/a>).<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u044f <code>servers<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#server-object\" rel=\"noopener noreferrer nofollow\">Server Object<\/a>), \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u043b\u0435 <code>url<\/code> \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c URL-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435  <code>description<\/code>. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<pre><code class=\"yaml\">servers: - url: https:\/\/europe.server.com\/v1   description: Server located in Germany. - url: https:\/\/america.server.com\/v1   description: Server located in Atlanta, GA. - url: https:\/\/asia.server.com\/v1   description: Server located in Shenzhen paths:   \/users:     get:       servers:       - url: https:\/\/europe.server2.com\/v1<\/code><\/pre>\n<p><a class=\"anchor\" name=\"swagger-typescript-api\" id=\"swagger-typescript-api\"><\/a><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d OpenAPI, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 <a href=\"https:\/\/www.npmjs.com\/package\/swagger-typescript-api\" rel=\"noopener noreferrer nofollow\">swagger-typescript-api<\/a>.<\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/www.npmjs.com\/package\/swagger-typescript-api\" rel=\"noopener noreferrer nofollow\">swagger-typescript-api<\/a> &#8212; \u044d\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Swagger \u0438\u043b\u0438 OpenAPI \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442. \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u043b\u0435 `server`, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 HTTP-\u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 JS-\u043a\u043b\u0430\u0441\u0441, \u0433\u0434\u0435 \u043e\u043d \u043c\u0430\u043f\u0438\u0442 \u043f\u043e\u043b\u044f <code>paths<\/code> \u0432 \u043c\u0435\u0442\u043e\u0434\u044b. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f ts-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0435\u0439 <code>scheme<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u043c \u0442\u0438\u043f\u044b \u0438\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b <code>components<\/code>.<\/p>\n<p>\u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043c\u0435\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 <a href=\"https:\/\/github.com\/acacode\/swagger-typescript-api\/tree\/master\/tests\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0438\u0431\u043a\u043e.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <code>npm i\u00a0-D swagger-typescript-api<\/code>.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0430\u0440\u0443 \u0441\u043e\u0432\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435:<\/p>\n<ol>\n<li>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u0441\u0435 \u0441\u0445\u0435\u043c\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 ts-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0444\u0440\u043e\u043d\u0442\u0430. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 <a href=\"https:\/\/github.com\/acacode\/swagger-typescript-api\/tree\/master\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>:<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/238\/854\/d90\/238854d908998dcf16ed500136940c90.jpg\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u0430\u043f\u0438\u043d\u0433\u0430 components \u0432 ts-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u0430\u043f\u0438\u043d\u0433\u0430 components \u0432 ts-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b\" width=\"920\" height=\"457\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/238\/854\/d90\/238854d908998dcf16ed500136940c90.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u0430\u043f\u0438\u043d\u0433\u0430 components \u0432 ts-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b<\/figcaption><\/div>\n<\/figure>\n<ol start=\"2\">\n<li>\n<p>\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0430-\u043b\u044f <code>services<\/code> \u0438 \u043f\u0440\u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 <code>package.json<\/code> \u043f\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0440\u0435\u043c\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u043f\u0446\u0438\u0439. \u0423 \u043d\u0430\u0441 \u043c\u043e\u043d\u043e\u0440\u0435\u043f\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u044b\u043d\u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0448\u0430\u0440\u0438\u043c \u043d\u0430 \u0432\u0441\u0435 \u0445\u043e\u0441\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d4f\/0a3\/50a\/d4f0a350a2527a51cc1155b791cd4ace.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 API \u043f\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 API \u043f\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\" width=\"5072\" height=\"1976\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d4f\/0a3\/50a\/d4f0a350a2527a51cc1155b791cd4ace.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 API \u043f\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<pre><code>npx swagger-typescript-api -p .\/swagger.json -o .\/src -n myApi.ts swagger-typescript-api -p .\/swagger.json -o .\/src -n myApi.ts sta -p .\/swagger.json -o .\/src -n myApi.ts<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0438\u0448\u0443 \u0440\u044f\u0434 \u043e\u043f\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f, \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u043e\u0442\u043c\u0435\u0447\u0443 \u0444\u043b\u0430\u0433 <code>--axios<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c HTTP \u043a\u043b\u0438\u0435\u043d\u0442 \u0441 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e fetch \u043d\u0430 axios. \u0417\u0434\u0435\u0441\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u043a\u0443\u0441\u043e\u0432\u0449\u0438\u043d\u044b. \u0420\u0430\u043d\u0435\u0435 \u044f \u043b\u044e\u0431\u0438\u043b axios, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f fetch \u043e\u043d \u0431\u044b\u043b \u043a\u0440\u0430\u0439\u043d\u0435 \u0443\u0434\u043e\u0431\u0435\u043d. \u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u044f \u043e\u0442 \u043d\u0435\u0433\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0438\u0437-\u0437\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f <a href=\"https:\/\/github.com\/axios\/axios\/issues\/1946\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u043d\u0430 \u0431\u044d\u043a\u0435. \u041d\u043e \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u044b\u043b\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 fetch, \u043d\u0435\u0436\u0435\u043b\u0438 \u0434\u0435\u0440\u0433\u0430\u0442\u044c \u0440\u0435\u0431\u044f\u0442, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e fetch \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u043e\u0431\u0435\u043d.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0444\u043b\u0430\u0433\u0438 <code>--path<\/code> \u0438 <code>--output<\/code>, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0433\u0434\u0435 \u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0438 \u043a\u0443\u0434\u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442.<\/p>\n<p>\u0424\u043b\u0430\u0433\u0438 \u043d\u0430 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044f &#8212;  <code>--responses<\/code> \u0438 <code>--type-prefix<\/code>. \u042f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e <code>\u2014-responses<\/code>, \u0447\u0442\u043e\u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c HTTP-\u043a\u043e\u0434\u0430\u043c, \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/91f\/215\/7bf\/91f2157bfc70549e4f82b0044b832f6d.png\" alt=\"\u041c\u0430\u043f\u0438\u043d\u0433 \u043a\u043e\u0434\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 JS Doc\" title=\"\u041c\u0430\u043f\u0438\u043d\u0433 \u043a\u043e\u0434\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 JS Doc\" width=\"2382\" height=\"1118\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/91f\/215\/7bf\/91f2157bfc70549e4f82b0044b832f6d.png\"\/><\/p>\n<div><figcaption>\u041c\u0430\u043f\u0438\u043d\u0433 \u043a\u043e\u0434\u043e\u0432 \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 JS Doc<\/figcaption><\/div>\n<\/figure>\n<p>\u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u044d\u043a\u043e\u043c \u0431\u0438\u0437\u043d\u0435\u0441-\u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>\u0424\u043b\u0430\u0433 <code>--type-prefix<\/code> \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u0432\u0430\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u043f\u0435\u0440\u0435\u0434 \u0442\u0438\u043f\u0430\u043c\u0438. \u0415\u0441\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0434 ts-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438, \u043d\u043e \u0438 ts-\u0442\u0438\u043f\u0430\u043c\u0438 \u0438 ts-enum\u2019\u0430\u043c\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 <code>--api-class-name<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 backend-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u0422\u0443\u0442, \u044f \u0434\u0443\u043c\u0430\u044e, \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438 \u0442\u0430\u043a.<\/p>\n<p>\u041a\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442? \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 JS-\u043a\u043b\u0430\u0441\u0441 \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0432\u0430\u0448\u0435\u0433\u043e API, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u0441\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u043c\u0438\u043d\u0438\u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"typescript\">export class DataLoadingModuleApi&lt;SecurityDataType extends unknown> extends HttpClient&lt;SecurityDataType> {   facade = {     \/**      * @description \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435      *      * @name LoadFileFacadeLoadFilePost      * @summary Load File      * @request POST:\/facade\/load_file      * @response `200` `FileUploadResponse` Successful Response      * @response `422` `HTTPValidationError` Validation Error      *\/     loadFileFacadeLoadFilePost: (       data: BodyLoadFileFacadeLoadFilePost,       query?: {         \/**          * Force          * @default false          *\/         force?: boolean;       },       params: RequestParams = {},     ) =>       this.request&lt;FileUploadResponse, HTTPValidationError>({         path: `\/facade\/load_file`,         method: 'POST',         query: query,         body: data,         type: ContentType.FormData,         format: 'json',         ...params,       }),   }; }<\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>request<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <code>HttpClient<\/code> , \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c <code>Promise<\/code> \u0441 <code>HttpResponse<\/code>. \u0414\u043b\u044f Axios \u0431\u0443\u0434\u0435\u0442 <code>AxiosResponse<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0435\u043d\u043d\u043e. \u0422\u0443\u0442 \u0443\u0436\u0435 \u043d\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438 &#8212;  \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u0434\u0435\u0440\u0433\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u044f\u043c\u043e \u0432 useEffect, \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/tanstack.com\/query\/latest\" rel=\"noopener noreferrer nofollow\">@tanstack\/react-query<\/a>, \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0445\u0443\u043a.<\/p>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0445\u0443\u043a\u0430 \u0441 <code>useMutation<\/code> \u0438\u0437 <code>@tanstack\/react-query<\/code> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <code>DataLoadingModuleApi<\/code>:<\/p>\n<pre><code class=\"typescript\">export const useLoadFilePostMutation = () => {   const [token] = useLocalStorage('accessToken', { value: '' });    return useMutation&lt;     HttpResponse&lt;FileUploadResponse, HTTPValidationError>,     HttpResponse&lt;FileUploadResponse, HTTPValidationError>,     BodyLoadFileFacadeLoadFilePost   >({     mutationFn: (data: BodyLoadFileFacadeLoadFilePost) =>       new DataLoadingModuleApi().facade.loadFileFacadeLoadFilePost(         data,         { force: true },         { headers: { authorization: `Bearer ${token.value}` } },       ),   }); };<\/code><\/pre>\n<p>\u0418 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0444\u043b\u0430\u0433 <code>\u2014-templates<\/code>. \u042d\u0442\u043e\u0442 \u0444\u043b\u0430\u0433 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u0441\u0432\u043e\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 <a href=\"https:\/\/eta.js.org\/\" rel=\"noopener noreferrer nofollow\">eta<\/a>-\u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u042d\u0442\u043e \u0438 \u0440\u0435\u0448\u0430\u0435\u0442 \u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0442\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b.<\/p>\n<p>\u041d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/www.npmjs.com\/package\/@devexperts\/remote-data-ts\" rel=\"noopener noreferrer nofollow\">RemoteData<\/a> \u0438 <a href=\"https:\/\/www.npmjs.com\/package\/fp-ts\" rel=\"noopener noreferrer nofollow\">fp-ts<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443 \u043d\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0445\u0443\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API. \u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u0445\u0435\u043b\u043f\u0435\u0440 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u044d\u0442\u0438\u043c \u0445\u0443\u043a\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b  \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u0418 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e-\u0445\u0435\u043b\u043f\u0435\u0440 \u043c\u044b \u043f\u043e\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u044f\u043d\u0435\u043c \u0440\u0443\u0447\u043a\u0430\u043c\u0438 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430. \u0414\u0430\u0432\u043d\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u0432\u043e\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u042f \u043f\u043e\u0434\u0441\u0443\u0435\u0447\u0443\u0441\u044c \u043f\u043e\u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043d\u0430\u043f\u0438\u0448\u0443 \u0441\u0432\u043e\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u043f\u0438\u0448\u0443 \u043e\u0431 \u044d\u0442\u043e\u043c \u0437\u0434\u0435\u0441\u044c.<\/p>\n<p>\u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/799853\/\"> https:\/\/habr.com\/ru\/articles\/799853\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u044f \u043e\u0437\u0430\u0434\u0430\u0447\u0438\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c. \u0410 \u043a\u0442\u043e \u043a\u0430\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 API \u0432 2024 \u0433\u043e\u0434\u0443? \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 Swagger-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0438\u043b\u0438 OpenAPI-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043a\u0430\u043a must have. \u0418 \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u043b\u044e\u0434\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044d\u0442\u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b c REST API. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0441\u0440\u0435\u0434\u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0442\u0430\u043a\u043e\u0432\u044b\u0435 \u0435\u0441\u0442\u044c, \u0438 \u0432\u0430\u043c \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0441\u043a\u0438\u0434\u044b\u0432\u0430\u044e\u0442 \u00ab\u0434\u0442\u043e\u043e\u0448\u043a\u0438\u00bb, \u0442\u043e \u0432\u043f\u0435\u0440\u0435\u0434 \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0442\u044c <a href=\"https:\/\/www.openapis.org\/\" rel=\"noopener noreferrer nofollow\">OpenApi<\/a>.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b <a href=\"https:\/\/www.npmjs.com\/package\/swagger-typescript-api\" rel=\"noopener noreferrer nofollow\">swagger-typescript-api<\/a> \u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0438\u0448\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 OpenAPI. \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u044d\u0442\u0438\u043c, \u043c\u043e\u0433\u0443\u0442 \u0441\u0440\u0430\u0437\u0443 <a href=\"#swagger-typescript-api\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e swagger-typescript-api<\/a>.<\/p>\n<p>\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f OpenAPI \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e API, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0447\u0435\u0440\u0435\u0437 HTTP \u0438\u043b\u0438 HTTP-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b. OpenAPI \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u043a\u0430\u043a \u0440\u044f\u0434 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u0440\u0430\u0437\u0443 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/structure\" rel=\"noopener noreferrer nofollow\">Structure of an OpenAPI Description<\/a>: JSON, YAML,\u00a0openapi\u00a0and\u00a0info<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/paths\" rel=\"noopener noreferrer nofollow\">API Endpoints<\/a>:\u00a0paths\u00a0and\u00a0responses.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/content\" rel=\"noopener noreferrer nofollow\">Content of Message Bodies<\/a>:\u00a0content\u00a0and\u00a0schema.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/parameters\" rel=\"noopener noreferrer nofollow\">Parameters and Payload of an Operation<\/a>:\u00a0parameters\u00a0and\u00a0requestBody.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/components\" rel=\"noopener noreferrer nofollow\">Reusing Descriptions<\/a>:\u00a0components\u00a0and\u00a0$ref.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/learn.openapis.org\/specification\/servers\" rel=\"noopener noreferrer nofollow\">API Servers<\/a>:\u00a0servers.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u041a\u0430\u0436\u0434\u044b\u0439 OpenAPI-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 JSON-\u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0438 \u0432 JSON-\u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u0442\u0430\u043a \u0438 \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/YAML\" rel=\"noopener noreferrer nofollow\">YAML<\/a>-\u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u042f \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f:<\/p>\n<pre><code class=\"json\">{   \"anObject\": {     \"aNumber\": 42,     \"aString\": \"This is a string\",     \"aBoolean\": true,     \"nothing\": null,     \"arrayOfNumbers\": [       1,       2,       3     ]   } }<\/code><\/pre>\n<pre><code class=\"yaml\"># Anything after a hash sign is a comment anObject:   aNumber: 42   aString: This is a string   aBoolean: true   nothing: null   arrayOfNumbers:     - 1     - 2     - 3 <\/code><\/pre>\n<p>JSON \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442: \u0437\u0430\u043f\u044f\u0442\u044b\u0435, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u044f, \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0442\u0440\u043e\u043a \u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432.<\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, YAML \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u0435\u0444\u0438\u0441\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (\u043e\u0442\u0441\u0442\u0443\u043f\u044b \u0432 JSON \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b).<\/p>\n<p>YAML \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438\u0437-\u0437\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0444\u0430\u0439\u043b\u0430, \u043d\u043e \u044d\u0442\u0438 \u0434\u0432\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 OpenAPI-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#openapi-object\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 OpenAPI<\/a>). \u0422\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u043f\u043e\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 OpenAPI \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438: <code>openapi<\/code> \u0438 <code>info<\/code>, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\n<p><code>paths<\/code><\/p>\n<\/li>\n<li>\n<p><code>components<\/code><\/p>\n<\/li>\n<li>\n<p><code>webhooks<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043b\u0435 <code>openapi<\/code>\u00a0(string) \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>3.1.0<\/code>. \u0412 \u043f\u043e\u043b\u0435 <code>info<\/code> (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#info-object\" rel=\"noopener noreferrer nofollow\">Info Object<\/a>) \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 API, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0430\u0432\u0442\u043e\u0440\u0430 \u0438 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043d\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <code>title<\/code> (string) \u0438 <code>version<\/code> (string).<\/p>\n<p>\u0410 \u043f\u043e\u043b\u0435 <code>paths<\/code>\u00a0(<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#paths-object\" rel=\"noopener noreferrer nofollow\">Paths Object<\/a>) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435  API Endpoints, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 YAML-\u0444\u043e\u0440\u043c\u0430\u0442\u0435:<\/p>\n<pre><code class=\"yaml\">openapi: 3.1.0 info:   title: A minimal OpenAPI Description   version: 0.0.1 paths: {}  # No endpoints defined<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e API Endpoints (\u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 Operations \u0438\u043b\u0438 Routes). \u041e\u043d\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f Paths \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 OpenAPI. \u041a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u043b\u0435 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 Paths \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u0443\u0442\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#path-item-object\" rel=\"noopener noreferrer nofollow\">Path Item Object<\/a>), \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u043e\u0434\u0438\u043d API endpoint.<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043e\u0441\u043e\u0439 \u0447\u0435\u0440\u0442\u044b <code>\/<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a URL-\u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 <a href=\"https:\/\/learn.openapis.org\/examples\/tictactoe.yaml\" rel=\"noopener noreferrer nofollow\">Tic Tac Toe sample API<\/a>:<\/p>\n<pre><code class=\"yaml\">openapi: 3.1.0 info:   title: Tic Tac Toe   description: |     This API allows writing down marks on a Tic Tac Toe board     and requesting the state of the board or of individual squares.   version: 1.0.0 paths:   # Whole board operations   \/board:     get:       summary: Get the whole board       description: Retrieves the current state of the board and the winner.       responses:         \"200\":           description: \"OK\"           content:             ... <\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u0443\u0442\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#path-item-object\" rel=\"noopener noreferrer nofollow\">Path Item Object<\/a>) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 HTTP \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 (EndPoint). \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <code>get<\/code>. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0438\u043c\u0435\u043d\u0430\u043c HTTP-\u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>get<\/code>, <code>put<\/code> \u0438 \u0442.\u0434.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#operation-object\" rel=\"noopener noreferrer nofollow\">Operation Object<\/a>) \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#responses-object\" rel=\"noopener noreferrer nofollow\">Responses Object<\/a>) &#8212; \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432. \u0418\u043c\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432 \u044d\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430 HTTP (\u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e &#171;200&#187;), \u0430 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#response-object\" rel=\"noopener noreferrer nofollow\">Response Object<\/a>), \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0442\u0432\u0435\u0442\u0435.<\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#response-object\" rel=\"noopener noreferrer nofollow\">Response Object<\/a>) \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u0435 <code>description<\/code> \u0441 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0430\u043c\u044b\u043c \u0432\u0430\u0436\u043d\u044b\u043c \u043f\u043e\u043b\u0435\u043c <code>content<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u043b\u0435 <code>content<\/code> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. \u041e\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#response-object\" rel=\"noopener noreferrer nofollow\">Response Object<\/a>), \u0442\u0430\u043a \u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 \u0442\u0435\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#request-body-object\" rel=\"noopener noreferrer nofollow\">Request Body Objects<\/a>) \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 <a href=\"https:\/\/tools.ietf.org\/html\/rfc6838\" rel=\"noopener noreferrer nofollow\">RFC6838 Media Types<\/a> \u0438 OpenAPI\u00a0<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#media-type-object\" rel=\"noopener noreferrer nofollow\">Media Type Objects<\/a>. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043b\u044f <code>content<\/code> \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <code>get<\/code> \u0437\u0430\u043f\u0440\u043e\u0441\u0430 <code>\/board<\/code>:<\/p>\n<pre><code class=\"yaml\">openapi: 3.1.0 info:   title: Tic Tac Toe   description: |     This API allows writing down marks on a Tic Tac Toe board     and requesting the state of the board or of individual squares.   version: 1.0.0 paths:   # Whole board operations   \/board:     get:       summary: Get the whole board       description: Retrieves the current state of the board and the winner.       responses:         \"200\":           description: \"OK\"           content:             application\/json:               schema:                 type: object                 properties:                     winner:                       type: string                       enum: [\".\", \"X\", \"O\"]                       description: |                         Winner of the game. `.` means nobody has won yet.                     board:                       type: array                       maxItems: 3                       minItems: 3                       items:                           type: array                           maxItems: 3                           minItems: 3                           items:                             type: string                             enum: [\".\", \"X\", \"O\"]                             description: |                               Possible values for a board square.                               `.` means empty square.   ...<\/code><\/pre>\n<p><a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#media-type-object\" rel=\"noopener noreferrer nofollow\">Media Type Object<\/a> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u0438\u043f \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 <a href=\"https:\/\/learn.openapis.org\/specification\/docs\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>). \u0414\u043b\u044f \u0442\u0438\u043f\u0430 <code>application\/json<\/code> \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043f\u043e\u043b\u0435 <code>schema<\/code>.<\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442 \u0441\u0445\u0435\u043c\u044b (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#schema-object\" rel=\"noopener noreferrer nofollow\">Schema Object<\/a>) \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u043c (integer, string, \u2026), \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u044f <code>type<\/code>. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0441\u0432\u043e\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u0438\u043d\u0430 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a \u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438\u043b\u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u0432.<\/p>\n<p>\u041e\u0431 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c. OpenAPI \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0432\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 &#8212; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0442\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430). \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (path parameters \u0438\u043b\u0438 query parameters), \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (body parameters). \u041a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0433\u0447\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<pre><code class=\"yaml\">paths:   # Single square operations   \/board\/{row}\/{column}:     parameters:       - name: row         in: path         required: true         schema:           type: integer           minimum: 1           maximum: 3       - name: column         in: path         required: true         schema:           type: integer           minimum: 1           maximum: 3     get:       summary: Get a single board square       responses:         ...     put:       summary: Set a single board square       requestBody:         required: true         content:           application\/json:             schema:               type: string               enum: [\".\", \"X\", \"O\"]       responses:         ...<\/code><\/pre>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <code>get<\/code> \u0432\u0438\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#parameter-object\" rel=\"noopener noreferrer nofollow\">Parameter Object<\/a>) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438:<\/p>\n<ul>\n<li>\n<p><code>in<\/code> (string) &#8212; \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (path, query \u0438\u043b\u0438 header)<\/p>\n<\/li>\n<li>\n<p><code>name<\/code> (string) &#8212; \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c (\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435)<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f <code>description<\/code> \u0438 <code>required<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0442\u0438\u043f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u0445\u0435\u043c\u044b (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#schemaObject\" rel=\"noopener noreferrer nofollow\">Schema Object<\/a>) \u0432 \u043f\u043e\u043b\u0435 <code>schema<\/code>.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,  <code>POST<\/code> \u0438\u043b\u0438 <code>PUT<\/code>, \u043e\u043d\u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 <code>requestBody<\/code>. \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0435\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#request-body-object\" rel=\"noopener noreferrer nofollow\">Request Body Object<\/a>) \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435 &#8212; <code>content<\/code>, \u0442\u043e \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#response-object\" rel=\"noopener noreferrer nofollow\">Response Object<\/a>).<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043f\u043e\u043b\u0435 <code>paths<\/code> \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435 OpenAPI (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#openapi-object\" rel=\"noopener noreferrer nofollow\">OpenAPI Object<\/a>), \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 <code>components<\/code>. \u042d\u0442\u043e \u043f\u043e\u043b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#components-object\" rel=\"noopener noreferrer nofollow\">Components Object<\/a>), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0441\u0445\u0435\u043c\u044b \u0432 <code>components<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u0445\u043b\u0430\u043c\u043b\u0435\u043d\u0438\u044f. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"yaml\">components:   schemas:     coordinate:       type: integer       minimum: 1       maximum: 3   parameters:     rowParam:       name: row       in: path       required: true       schema:         $ref: \"#\/components\/schemas\/coordinate\"     columnParam:       name: column       in: path       required: true       schema:         $ref: \"#\/components\/schemas\/coordinate\" paths:   \/board\/{row}\/{column}:     parameters:       - $ref: \"#\/components\/parameters\/rowParam\"       - $ref: \"#\/components\/parameters\/columnParam\"<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0437\u0430\u0434\u0430\u043d\u043e \u0434\u0432\u0430 <a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#components-object\" rel=\"noopener noreferrer nofollow\">Components Object<\/a> &#8212; <code>schemas<\/code> \u0438 <code>parameters<\/code>. <code>rowParam<\/code> \u0438 <code>columnParam<\/code> \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c <a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#reference-object\" rel=\"noopener noreferrer nofollow\">Reference Objects<\/a> \u043d\u0430 <code>coordinate<\/code> \u0438\u0437 <code>schemas<\/code>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u0435 <code>servers<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435 OpenAPI (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#openapi-object\" rel=\"noopener noreferrer nofollow\">OpenAPI Object<\/a>), \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u0443\u0442\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#path-item-object\" rel=\"noopener noreferrer nofollow\">Path Item Object<\/a>) \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#operationServers\" rel=\"noopener noreferrer nofollow\">Operation Object<\/a>).<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u044f <code>servers<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (<a href=\"https:\/\/spec.openapis.org\/oas\/v3.1.0#server-object\" rel=\"noopener noreferrer nofollow\">Server Object<\/a>), \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u043b\u0435 <code>url<\/code> \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c URL-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435  <code>description<\/code>. <\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-370664","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/370664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=370664"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/370664\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=370664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=370664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=370664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}