{"id":304302,"date":"2020-05-26T21:00:45","date_gmt":"2020-05-26T21:00:45","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304302"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304302","title":{"rendered":"\u0418\u0433\u0440\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c API: Swagger Play"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503958\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/33c1K8E9nbOCJJg6g6jKHQVmG8gvjWxdyqccUKbwbBruYSQcTCSciB2U8bX4cqsXcOBkGLGcHo3BwRtzmk5mwYGgu1JHZWlTe5c7wn_fT0F-HS_inZ-6xKHjludRoTEhQvp3c32_\" \/><\/div>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Swagger \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f Play Framework, \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438. \u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443:<\/p>\n<ol>\n<li>\u041a\u0430\u043a \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Swagger-Play (\u043c\u043e\u0434\u0443\u043b\u044c Play, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 swagger-api \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 OpenAPI) \u0438 \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c swagger-ui (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 javascript, \u0441\u043b\u0443\u0436\u0430\u0449\u0443\u044e \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438)<\/li>\n<li>\u041e\u043f\u0438\u0448\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 Swagger-Core \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e\u0431 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f Scala<\/li>\n<li>\u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u041a\u0430\u043a \u043e\u0431\u043e\u0439\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432 Swagger, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0430\u043c\u0438<\/li>\n<li>\u041a\u0430\u043a \u043d\u0430\u0443\u0447\u0438\u0442\u044c Swagger \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c ADT (\u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445)<\/li>\n<li>\u041a\u0430\u043a \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/li>\n<\/ol>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Play Framework \u043d\u0430 Scala \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 API.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/h2>\n<p>  \u0418\u0437\u0443\u0447\u0438\u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0434\u0435\u043b\u0430\u044e \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c Swagger \u0438 Play Framework, \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c Swagger Play2.<\/p>\n<p>  \u0410\u0434\u0440\u0435\u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435:<\/p>\n<p>  <a href=\"https:\/\/github.com\/swagger-api\/swagger-play\">https:\/\/github.com\/swagger-api\/swagger-play<\/a><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"scala\">libraryDependencies ++= Seq(   &quot;io.swagger&quot; %% &quot;swagger-play2&quot; % &quot;2.0.1-SNAPSHOT&quot; ) <\/code><\/pre>\n<p>  \u0418 \u0437\u0434\u0435\u0441\u044c \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:<\/p>\n<p>  \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u043d\u0438 \u0438\u0437 Maven-central, \u043d\u0438 \u0438\u0437 Sonatype \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432.<\/p>\n<p>  \u0412 Maven-central \u0432\u0441\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u043b\u0438\u0441 \u043d\u0430 Scala 2.12. \u0412\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043b\u044f Scala 2.13.<\/p>\n<p>  \u041e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043e\u043d\u0438 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f.<\/p>\n<p>  \u041f\u043e\u043b\u0430\u0437\u0438\u0432 \u043f\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e Sonatype-releases, \u044f \u043d\u0430\u0448\u0435\u043b \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043a \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0410\u0434\u0440\u0435\u0441 \u043d\u0430 github:<\/p>\n<p>  <a href=\"https:\/\/github.com\/iterable\/swagger-play\">https:\/\/github.com\/iterable\/swagger-play<\/a><\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"scala\">libraryDependencies ++= Seq(   &quot;com.iterable&quot; %% &quot;swagger-play&quot; % &quot;2.0.1&quot; ) <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 Sonatype:<\/p>\n<pre><code class=\"scala\">resolvers += Resolver.sonatypeRepo(&quot;releases&quot;) <\/code><\/pre>\n<p>  (\u041d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0442.\u043a. \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u0432 \u0435\u0441\u0442\u044c Maven-central)<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 application.conf<\/p>\n<pre><code class=\"scala\">play.modules.enabled += &quot;play.modules.swagger.SwaggerModule&quot; <\/code><\/pre>\n<p>  \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0432 routes:<\/p>\n<pre><code class=\"scala\">GET     \/swagger.json           controllers.ApiHelpController.getResources <\/code><\/pre>\n<p>  \u0418 \u043c\u043e\u0434\u0443\u043b\u044c \u0433\u043e\u0442\u043e\u0432 \u043a \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0434\u0443\u043b\u044c Swagger Play \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c json-\u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430\u0441\u043b\u0430\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 Swagger, \u043d\u0443\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438: swagger-ui. \u041e\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 swagger.json, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c rest-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 Postman, Rest-client \u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"scala\">libraryDependencies += &quot;org.webjars&quot; % &quot;swagger-ui&quot; % &quot;3.25.3&quot; <\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434, \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u0437\u043e\u0432\u044b \u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0430\u0439\u043b index.html \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<pre><code class=\"scala\">def redirectDocs: Action[AnyContent] = Action {     Redirect(        url = &quot;\/assets\/lib\/swagger-ui\/index.html&quot;,        queryStringParams = Map(&quot;url&quot; -&gt; Seq(&quot;\/swagger.json&quot;)))   } <\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0432 \u0444\u0430\u0439\u043b\u0435 routes:<\/p>\n<pre><code class=\"scala\">GET   \/docs                   controllers.HomeController.redirectDocs() <\/code><\/pre>\n<p>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 webjars-play. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"scala\">libraryDependencies +=  &quot;org.webjars&quot; %% &quot;webjars-play&quot; % &quot;2.8.0&quot; <\/code><\/pre>\n<p>  \u0418 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0444\u0430\u0439\u043b routes \u043c\u0430\u0440\u0448\u0440\u0443\u0442:<\/p>\n<pre><code class=\"scala\">GET     \/assets\/*file               controllers.Assets.at(path=&quot;\/public&quot;, file) <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e, \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/p>\n<p>  <a href=\"http:\/\/localhost:9000\/docs\">http:\/\/localhost:9000\/docs<\/a><\/p>\n<p>  \u0438, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 swagger \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p>  <a href=\"https:\/\/lh4.googleusercontent.com\/OFtpuW76n_AluK85tP4C1qy52CtSzBbSf_GGh95co295Hu46M5YfU8FNjdC7dbB0JVdVkUwVq5D3dZy7wJOoh8YeOPlBLQm4BEW7PGmKcrmCILqpxMDrOh14m32SboYzvC-pN2xY\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/OFtpuW76n_AluK85tP4C1qy52CtSzBbSf_GGh95co295Hu46M5YfU8FNjdC7dbB0JVdVkUwVq5D3dZy7wJOoh8YeOPlBLQm4BEW7PGmKcrmCILqpxMDrOh14m32SboYzvC-pN2xY\" \/><\/div>\n<p><\/a><\/p>\n<p>  \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043d\u0430\u0448\u0435\u043c rest-api. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043c\u043e\u0434\u0443\u043b\u0435\u043c Swagger-Play.<\/p>\n<h2>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438<\/h2>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 swagger-api-core \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435:<\/p>\n<p>  <a href=\"https:\/\/github.com\/swagger-api\/swagger-core\/wiki\/Annotations-1.5.X\">https:\/\/github.com\/swagger-api\/swagger-core\/wiki\/Annotations-1.5.X<\/a><\/p>\n<p>  \u0412 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438:<\/p>\n<p>  <strong>&commat;Api <\/strong> \u2014 \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043a\u0430\u043a \u0440\u0435\u0441\u0443\u0440\u0441 Swagger (\u0434\u043b\u044f \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f)<\/p>\n<p>  <strong>&commat;ApiImplicitParam<\/strong> \u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u00ab\u043d\u0435\u044f\u0432\u043d\u044b\u0439\u00bb \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0432 \u0442\u0435\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430)<\/p>\n<p>  <strong>&commat;ApiImplicitParams<\/strong> \u2014 \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 &commat;ApiImplicitParam<\/p>\n<p>  <strong>&commat;ApiModel<\/strong> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<p>  <strong>&commat;ApiModelProperty<\/strong> \u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<p>  <strong>&commat;ApiOperation<\/strong> \u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 (\u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435)<\/p>\n<p>  <strong>&commat;ApiParam<\/strong> \u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c (\u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440)<\/p>\n<p>  <strong>&commat;ApiResponse<\/strong> \u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441<\/p>\n<p>  <strong>&commat;ApiResponses <\/strong> \u2014 \u0441\u043b\u0443\u0436\u0438\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 &commat;ApiResponse. \u041e\u0431\u044b\u0447\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043a\u043e\u0434\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a). \u0423\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 &commat;ApiOperation<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b Swagger \u043e\u0442\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e &commat;Api<\/p>\n<pre><code class=\"scala\">@Api(value = \u00abRestController\u00bb, produces = \u00abapplication\/json\u00bb) class RestController @Inject()(<\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b Swagger \u043d\u0430\u0448\u0435\u043b \u0432 \u0444\u0430\u0439\u043b\u0435 routes \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445.<\/p>\n<p>  <a href=\"https:\/\/lh3.googleusercontent.com\/Bhy9aYulQ19v_Gxz9206WQv_KtsT7iqSd7KO3qAg-9A8oKRNYlKUfbgJonixaEvp7jPabx_NoSAoL53aZwx1AbaynjldnW1ZLJXJletFGgF4VGBtaLwdDgYLpFcxJ5e_JXMkymny\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/Bhy9aYulQ19v_Gxz9206WQv_KtsT7iqSd7KO3qAg-9A8oKRNYlKUfbgJonixaEvp7jPabx_NoSAoL53aZwx1AbaynjldnW1ZLJXJletFGgF4VGBtaLwdDgYLpFcxJ5e_JXMkymny\" \/><\/div>\n<p><\/a><\/p>\n<p>  \u041d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c Swagger \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u044f\u0432\u043d\u043e \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. Swagger \u0436\u0434\u0435\u0442 \u043e\u0442 \u043d\u0430\u0441 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043e\u043a \u0432 \u0432\u0438\u0434\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439. <\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 Swagger \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442, \u043a\u0430\u043a \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u0448\u0438 \u043a\u043b\u0430\u0441\u0441\u044b. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e uPickle, \u043a\u0442\u043e-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Circe, \u043a\u0442\u043e-\u0442\u043e Play-JSON. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 Java, \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 Scala \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u044e\u0430\u043d\u0441\u043e\u0432.<\/p>\n<p>  \u0418 \u043f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u2014 \u044d\u0442\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441: \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Java \u043a\u043e\u0434:<\/p>\n<pre><code class=\"java\">@ApiResponses(value = {       @ApiResponse(code = 400, message = &quot;Invalid ID supplied&quot;),       @ApiResponse(code = 404, message = &quot;Pet not found&quot;) })  <\/code><\/pre>\n<p>  \u0412 Scala \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"scala\">@ApiResponses(value = Array(       new ApiResponse(code = 400, message = &quot;Invalid ID supplied&quot;),       new ApiResponse(code = 404, message = &quot;Pet not found&quot;) ))  <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 1<\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0449\u0435\u0442 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"scala\">def find(id: String): Action[AnyContent] =      safeAction(AllowRead(DrillObj)).async { implicit request =&gt;       drillsDao.findById(UUID.fromString(id))         .map(x =&gt; x.fold(NotFound(s&quot;Drill with id=$id not found&quot;))(x =&gt;              Ok(write(x)))).recover(errorsPf)     }        <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0439 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430, \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u0434\u0430\u0441\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 Drill:<\/p>\n<pre><code class=\"scala\"> @ApiOperation(     value = &quot;\u041d\u0430\u0439\u0442\u0438 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u043a\u0443&quot;,     response = classOf[Drill]   )   @ApiResponses(value = Array(     new ApiResponse(code = 404, message = &quot;Drill with id=$id not found&quot;)   ))   def find(@ApiParam(value = &quot;String rep of UUID, id \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438&quot;) id: String)=     safeAction(AllowRead(DrillObj)).async { implicit request =&gt;       drillsDao.findById(UUID.fromString(id))         .map(x =&gt; x.fold(NotFound(s&quot;Drill with id=$id not found&quot;))(x =&gt;           Ok(write(x)))).recover(errorsPf)     }  <\/code><\/pre>\n<p>  <a href=\"https:\/\/lh4.googleusercontent.com\/JvexX_zpbwqXN-okFV-UFjMLWzhG0aIjPn9Rk56d2HvnJDgNKOARF0UFpHl3Sk0-fmCjxH5VBSv2dtisRJgojfopMxqvgu4NSaTwD38-pvlUivu7QwjGUXNWMxtfSszH1vG_4zca\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/JvexX_zpbwqXN-okFV-UFjMLWzhG0aIjPn9Rk56d2HvnJDgNKOARF0UFpHl3Sk0-fmCjxH5VBSv2dtisRJgojfopMxqvgu4NSaTwD38-pvlUivu7QwjGUXNWMxtfSszH1vG_4zca\" \/><\/div>\n<p><\/a><\/p>\n<p>  \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. Swagger \u043f\u043e\u0447\u0442\u0438 \u0443\u0433\u0430\u0434\u0430\u043b, \u0432\u043e \u0447\u0442\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442, \u0437\u0430 \u043e\u0434\u043d\u0438\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c: \u043f\u043e\u043b\u044f start \u0438 end \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435 Drill \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 Instant, \u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0432 Long. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b 0 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041c\u044b \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 @ApiModel, @ApiModelProperty \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443:<\/p>\n<pre><code class=\"scala\">@ApiModel case class Drill(                 id: UUID,                 name: String,                 @ApiModelProperty(                   dataType = &quot;Long&quot;,                   example = &quot;1585818000000&quot;                 )                 start: Instant,                 @ApiModelProperty(                   dataType = &quot;Long&quot;,                   example = &quot;1585904400000&quot;                 )                 end: Option[Instant],                 isActive: Boolean                 )  <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<p>  <a href=\"https:\/\/lh5.googleusercontent.com\/sycu_0EADFpIQHX0y2HcHr_HYuit5Il6nfj5gS3dAPG6NxJjL60C1yFjes6qzZBroMBw8PA7Z-8vOUtnRDZ_3Yygj6BXB3VCZIy0I2qTA7W6BMoYgmMn0p1zu2up1hEqUTZ-GVCU\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/sycu_0EADFpIQHX0y2HcHr_HYuit5Il6nfj5gS3dAPG6NxJjL60C1yFjes6qzZBroMBw8PA7Z-8vOUtnRDZ_3Yygj6BXB3VCZIy0I2qTA7W6BMoYgmMn0p1zu2up1hEqUTZ-GVCU\" \/><\/div>\n<p>  <\/a><\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 2<\/h2>\n<p>  \u0414\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 Post, \u0433\u0434\u0435 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0435\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f &commat;ApiImplicitParams:<\/p>\n<pre><code class=\"scala\"> @ApiOperation(value = &quot;\u041d\u043e\u0432\u0430\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430&quot;)   @ApiImplicitParams(Array(     new ApiImplicitParam(       value = &quot;\u041d\u043e\u0432\u0430\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0430&quot;,       required = true,       dataTypeClass = classOf[Drill],       paramType = &quot;body&quot;     )   ))   @ApiResponses(value = Array(     new ApiResponse(code = 200, message = &quot;ok&quot;)   ))   def insert() = safeAction(AllowWrite(DrillObj)).async { implicit request =&gt; <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 3<\/h2>\n<p>  \u041f\u043e\u043a\u0430 \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0412\u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0435\u0441\u0442\u044c \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0439 \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0442\u0438\u043f\u0430:<\/p>\n<pre><code class=\"scala\">case class SessionedResponse[T](                             val ses: SessionData,                             val payload: T                           ) <\/code><\/pre>\n<p>  Swagger \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0438, \u043f\u043e\u043a\u0430, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435. \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"scala\">@ApiOperation(     value = &quot;\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u043a&quot;,     response = classOf[SessionedResponse[Drill]]   )  <\/code><\/pre>\n<p>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 \u043e\u0442 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043d\u0430\u043c \u0442\u0438\u043f\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 DrillSessionedResponse.<br \/>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0431\u0435\u0434\u0430, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043e\u0442 case-\u043a\u043b\u0430\u0441\u0441\u0430. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u043d\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c case class \u043d\u0430 class. \u0422\u043e\u0433\u0434\u0430:<\/p>\n<pre><code class=\"scala\">class SessionedResponse[T](                             val ses: SessionData,                             val payload: T                           )  object SessionedResponse {   def apply[T](ses: SessionData, payload: T) = new SessionedResponse[T](ses, payload)   }  private[controllers] class DrillSessionedResponse(           ses: SessionData,           payload: List[Drill] ) extends SessionedResponse[List[Drill]](ses, payload) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u044f \u043c\u043e\u0433\u0443 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"scala\">@ApiOperation(     value = &quot;\u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u043a&quot;,     response = classOf[DrillSessionedResponse]   ) <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 4<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 ADT \u2014 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  \u0412 Swagger \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 ADT:<\/p>\n<p>  \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f &commat;ApiModel \u0438\u043c\u0435\u0435\u0442 2 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438:<\/p>\n<p>  1. <strong>subTypes<\/strong> \u2014 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/p>\n<p>  2. <strong>discriminator<\/strong> \u2014 \u043f\u043e\u043b\u0435, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430.<\/p>\n<p>  \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, uPickle \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f JSON \u0438\u0437 case-\u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0441\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0435 $type, a case \u2014 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0432 \u0441\u0442\u0440\u043e\u043a\u0438. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u043f\u043e\u043b\u0435\u043c discriminator \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435\u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c.<\/p>\n<p>  \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0435\u0441\u0442\u044c<\/p>\n<pre><code class=\"scala\">sealed trait Permission  case class Write(obj: Obj) extends Permission case class Read(obj: Obj) extends Permission  <\/code><\/pre>\n<p>  \u0433\u0434\u0435 Obj \u2014 \u044d\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 ADT, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 case \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432:<\/p>\n<pre><code class=\"scala\">\/\/\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432 permission.drill case object DrillObj extends Obj  \/\/\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f permission.team case object TeamObj extends Obj  <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b Swagger \u0441\u043c\u043e\u0433 \u043f\u043e\u043d\u044f\u0442\u044c \u044d\u0442\u0443 \u043c\u043e\u0434\u0435\u043b\u044c, \u0435\u043c\u0443 \u043d\u0430\u0434\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 (\u0438\u043b\u0438 \u0442\u0440\u0435\u0439\u0442\u0430) \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438:<\/p>\n<pre><code class=\"scala\">@ApiModel(value = &quot;Permission&quot;) case class FakePermission(        @ApiModelProperty(          name = &quot;$type&quot;,          allowableValues = &quot;ru.myproject.shared.Read, ru.myproject.shared.Read&quot;        )        t: String,        @ApiModelProperty(allowableValues = &quot;permission.drill, permission.team&quot;        obj: String      ) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 FakePermission \u0432\u043c\u0435\u0441\u0442\u043e Permission<\/p>\n<pre><code class=\"scala\">@ApiImplicitParams(Array(     new ApiImplicitParam(       value = &quot;\u0414\u043e\u043f\u0443\u0441\u043a&quot;,       required = true,       dataTypeClass = classOf[FakePermission],       paramType = &quot;body&quot;     )   )) <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/h2>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u043d\u0430 \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, Swagger \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c\u0438 \u043e\u043d \u0443\u043c\u0435\u0435\u0442.<\/p>\n<p>  \u0422\u0430\u043a, \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f &commat;ApiOperation \u0438\u043c\u0435\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 responseContainer, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00abList\u00bb.<\/p>\n<p>  \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 <\/p>\n<pre><code class=\"scala\">dataType = &quot;List[ru.myproject.shared.roles.FakePermission]&quot; <\/code><\/pre>\n<p>  \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u044d\u0442\u043e\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c. \u0425\u043e\u0442\u044f, \u0435\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c scala.collection.List \u2014 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<p>  \u0412 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 Swagger-Core \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0438\u0441\u0430\u0442\u044c Rest-API \u0438 \u0432\u0441\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0438 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f Swagger-Play \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f API.<\/div>\n<p> \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\/post\/503958\/\"> https:\/\/habr.com\/ru\/post\/503958\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503958\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/33c1K8E9nbOCJJg6g6jKHQVmG8gvjWxdyqccUKbwbBruYSQcTCSciB2U8bX4cqsXcOBkGLGcHo3BwRtzmk5mwYGgu1JHZWlTe5c7wn_fT0F-HS_inZ-6xKHjludRoTEhQvp3c32_\" \/><\/div>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Swagger \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f Play Framework, \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438. \u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443:<\/p>\n<ol>\n<li>\u041a\u0430\u043a \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Swagger-Play (\u043c\u043e\u0434\u0443\u043b\u044c Play, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 swagger-api \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 OpenAPI) \u0438 \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c swagger-ui (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 javascript, \u0441\u043b\u0443\u0436\u0430\u0449\u0443\u044e \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438)<\/li>\n<li>\u041e\u043f\u0438\u0448\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 Swagger-Core \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e\u0431 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f Scala<\/li>\n<li>\u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u041a\u0430\u043a \u043e\u0431\u043e\u0439\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432 Swagger, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0430\u043c\u0438<\/li>\n<li>\u041a\u0430\u043a \u043d\u0430\u0443\u0447\u0438\u0442\u044c Swagger \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c ADT (\u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445)<\/li>\n<li>\u041a\u0430\u043a \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/li>\n<\/ol>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Play Framework \u043d\u0430 Scala \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 API.  <\/p>\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-304302","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304302","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=304302"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304302\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}