{"id":321579,"date":"2021-04-16T15:00:52","date_gmt":"2021-04-16T15:00:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=321579"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=321579","title":{"rendered":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 Swashbuckle"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><a href=\"https:\/\/swagger.io\/\" rel=\"nofollow noopener noreferrer\">Swagger<\/a> \u2014 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0449\u044c! \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u043c API \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0447\u0435\u0440\u0435\u0437 UI. \u0412 ASP.NET Core \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 Swagger \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/github.com\/domaindrivendev\/Swashbuckle.AspNetCore\" rel=\"nofollow noopener noreferrer\">Swashbuckle.AspNetCore<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f. Swashbuckle \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 XML-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0432 \u043a\u043e\u0434\u0435 .NET. \u041d\u043e \u043e\u043d \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0447\u043b\u0435\u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044c\u0442\u0435 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043e \u0447\u0451\u043c \u0438\u0434\u0451\u0442 \u0440\u0435\u0447\u044c.<\/p>\n<p>  <\/p>\n<h2 id=\"sozdanie-servisa\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/h2>\n<p>  <\/p>\n<p>\u042f \u0441\u043e\u0437\u0434\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0439 Web-\u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/\/ &lt;summary&gt; \/\/\/ Contains endpoints that use different enums. \/\/\/ &lt;\/summary&gt; [Route(&quot;api\/data&quot;)] [ApiController] public class EnumsController : ControllerBase {     \/\/\/ &lt;summary&gt;     \/\/\/ Executes operation of requested type and returns result status.     \/\/\/ &lt;\/summary&gt;     \/\/\/ &lt;param name=&quot;id&quot;&gt;Operation id.&lt;\/param&gt;     \/\/\/ &lt;param name=&quot;type&quot;&gt;Operation type.&lt;\/param&gt;     \/\/\/ &lt;returns&gt;Result status.&lt;\/returns&gt;     [HttpGet]     public Task&lt;Result&gt; ExecuteOperation(int id, OperationType type)     {         return Task.FromResult(Result.Success);     }      \/\/\/ &lt;summary&gt;     \/\/\/ Changes data     \/\/\/ &lt;\/summary&gt;     [HttpPost]     public Task&lt;IActionResult&gt; Change(DataChange change)     {         return Task.FromResult&lt;IActionResult&gt;(Ok());     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u0441\u0442: \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0438\u043f\u043e\u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">\/\/\/ &lt;summary&gt; \/\/\/ Operation types. \/\/\/ &lt;\/summary&gt; public enum OperationType {     \/\/\/ &lt;summary&gt;     \/\/\/ Do operation.     \/\/\/ &lt;\/summary&gt;     Do,     \/\/\/ &lt;summary&gt;     \/\/\/ Undo operation.     \/\/\/ &lt;\/summary&gt;     Undo }  \/\/\/ &lt;summary&gt; \/\/\/ Operation results. \/\/\/ &lt;\/summary&gt; public enum Result {     \/\/\/ &lt;summary&gt;     \/\/\/ Operations was completed successfully.     \/\/\/ &lt;\/summary&gt;     Success,     \/\/\/ &lt;summary&gt;     \/\/\/ Operation failed.     \/\/\/ &lt;\/summary&gt;     Failure }  \/\/\/ &lt;summary&gt; \/\/\/ Data change information. \/\/\/ &lt;\/summary&gt; public class DataChange {     \/\/\/ &lt;summary&gt;     \/\/\/ Data id.     \/\/\/ &lt;\/summary&gt;     public int Id { get; set; }      \/\/\/ &lt;summary&gt;     \/\/\/ Source type.     \/\/\/ &lt;\/summary&gt;     public Sources Source { get; set; }      \/\/\/ &lt;summary&gt;     \/\/\/ Operation type.     \/\/\/ &lt;\/summary&gt;     public OperationType Operation { get; set; } }  \/\/\/ &lt;summary&gt; \/\/\/ Types of sources. \/\/\/ &lt;\/summary&gt; public enum Sources {     \/\/\/ &lt;summary&gt;     \/\/\/ In-memory data source.     \/\/\/ &lt;\/summary&gt;     Memory,     \/\/\/ &lt;summary&gt;     \/\/\/ Database data source.     \/\/\/ &lt;\/summary&gt;     Database }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 Swagger \u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 NuGet-\u043f\u0430\u043a\u0435\u0442 <code>Swashbuckle.AspNetCore<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432 <code>Startup<\/code>-\u0444\u0430\u0439\u043b\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">public class Startup {     \/\/ This method gets called by the runtime. Use this method to add services to the container.     public void ConfigureServices(IServiceCollection services)     {         services.AddControllers();          services.AddSwaggerGen(c =&gt; {              \/\/ Set the comments path for the Swagger JSON and UI.             var xmlFile = $&quot;{Assembly.GetExecutingAssembly().GetName().Name}.xml&quot;;             var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);             c.IncludeXmlComments(xmlPath);         });     }      \/\/ This method gets called by the runtime. Use this method to configure the HTTP request pipeline.     public void Configure(IApplicationBuilder app, IWebHostEnvironment env)     {         if (env.IsDevelopment())         {             app.UseDeveloperExceptionPage();         }          app.UseSwagger();          app.UseSwaggerUI();          app.UseRouting();          ...     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>http:\/\/localhost:5000\/swagger\/index.html<\/code> \u043c\u044b \u043d\u0430\u0439\u0434\u0451\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ul\/f9\/vo\/ulf9voyrt7i6jvp7trl-dor_ypk.png\" alt=\"Swagger UI \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\"><\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043f\u043e\u043a\u0430 \u043d\u0430\u0448\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0438\u0441\u043b\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0m\/tv\/9q\/0mtv9qkn1pr6jeavkb0blp7sx_q.png\" alt=\"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0447\u0438\u0441\u043b\u0430\u043c\u0438\"><\/p>\n<p>  <\/p>\n<p>\u041b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0443\u0434\u043e\u0431\u043d\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041e\u043d\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0431\u0435\u0437\u043b\u0438\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u042f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b NuGet-\u043f\u0430\u043a\u0435\u0442 <code>Swashbuckle.AspNetCore.Newtonsoft<\/code>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u044f \u0447\u0443\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u042f \u0437\u0430\u043c\u0435\u043d\u0438\u043b<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">services.AddControllers();<\/code><\/pre>\n<p>  <\/p>\n<p>\u043d\u0430<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">services.AddControllers().AddNewtonsoftJson(o =&gt; {     o.SerializerSettings.Converters.Add(new StringEnumConverter     {         CamelCaseText = true     }); });<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/de\/uk\/8o\/deuk8op2hq5uyyhqcx59rrjazp0.png\" alt=\"\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438\"><\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0438 \u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043e\u0434\u0438\u043d \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a. XML-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0447\u043b\u0435\u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 Swagger UI.<\/p>\n<p>  <\/p>\n<h2 id=\"opisanie-tipov-perechisleniy\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439<\/h2>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043d\u0430\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438\u0445. \u0411\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u043e\u0438\u0441\u043a \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0430\u043b \u043c\u043d\u0435. \u041d\u043e, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u044f \u043d\u0430\u0448\u0451\u043b <a href=\"https:\/\/gist.github.com\/edfarrow\/3162b0b7f7940e92b4d38da9b741fa4c\" rel=\"nofollow noopener noreferrer\">\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043a\u043e\u0434<\/a>. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u043d \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Swashbuckle. \u041d\u043e \u043e\u043d \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b \u043c\u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>Swashbuckle \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>ISchemaFilter<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0445\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">public class EnumTypesSchemaFilter : ISchemaFilter {     private readonly XDocument _xmlComments;      public EnumTypesSchemaFilter(string xmlPath)     {         if(File.Exists(xmlPath))         {             _xmlComments = XDocument.Load(xmlPath);         }     }      public void Apply(OpenApiSchema schema, SchemaFilterContext context)     {         if (_xmlComments == null) return;          if(schema.Enum != null &amp;&amp; schema.Enum.Count &gt; 0 &amp;&amp;             context.Type != null &amp;&amp; context.Type.IsEnum)         {             schema.Description += &quot;&lt;p&gt;Members:&lt;\/p&gt;&lt;ul&gt;&quot;;              var fullTypeName = context.Type.FullName;              foreach (var enumMemberName in schema.Enum.OfType&lt;OpenApiString&gt;().Select(v =&gt; v.Value))             {                 var fullEnumMemberName = $&quot;F:{fullTypeName}.{enumMemberName}&quot;;                  var enumMemberComments = _xmlComments.Descendants(&quot;member&quot;)                     .FirstOrDefault(m =&gt; m.Attribute(&quot;name&quot;).Value.Equals(fullEnumMemberName, StringComparison.OrdinalIgnoreCase));                 if (enumMemberComments == null) continue;                  var summary = enumMemberComments.Descendants(&quot;summary&quot;).FirstOrDefault();                 if (summary == null) continue;                  schema.Description += $&quot;&lt;li&gt;&lt;i&gt;{enumMemberName}&lt;\/i&gt; - {summary.Value.Trim()}&lt;\/li&gt;&quot;;              }              schema.Description += &quot;&lt;\/ul&gt;&quot;;         }     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 XML-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438. \u0415\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>XDocument<\/code>. \u0417\u0430\u0442\u0435\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <code>Apply<\/code> \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u0445\u0435\u043c\u0430 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0441\u0445\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0442\u043e \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u0430 HTML-\u0441\u043f\u0438\u0441\u043e\u043a, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u0447\u043b\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b Swashbuckle \u0437\u043d\u0430\u043b \u043e \u043d\u0451\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">services.AddSwaggerGen(c =&gt; {      \/\/ Set the comments path for the Swagger JSON and UI.     var xmlFile = $&quot;{Assembly.GetExecutingAssembly().GetName().Name}.xml&quot;;     var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);     c.IncludeXmlComments(xmlPath);      c.SchemaFilter&lt;EnumTypesSchemaFilter&gt;(xmlPath); });<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>SchemaFilter<\/code> \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 Swagger. \u042d\u0442\u043e\u043c\u0443 \u043c\u0435\u0442\u043e\u0434\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 XML-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438. \u0418\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <code>EnumTypesSchemaFilter<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 Swagger UI \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432-\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bw\/sd\/6t\/bwsd6tzwsux3v4r-w_1kdernbzq.png\" alt=\"XML-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u0447\u043b\u0435\u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\"><\/p>\n<p>  <\/p>\n<h2 id=\"opisanie-perechisleniy-v-parametrah\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445<\/h2>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0443\u0436\u0435 \u043b\u0443\u0447\u0448\u0435. \u041d\u043e \u0432\u0441\u0451 \u0436\u0435 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e. \u0423 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">public Task&lt;Result&gt; ExecuteOperation(int id, OperationType type)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0435\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 Swagger UI:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/x4\/vl\/gt\/x4vlgtw5sezcamps0zyfagmp3qc.png\" alt=\"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\"><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0447\u043b\u0435\u043d\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0430 \u043d\u0435 \u0435\u0433\u043e \u0442\u0438\u043f\u0430. \u0422.\u0435. \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 XML-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u043c\u0435\u0442\u043e\u0434\u0430, \u0430 \u043d\u0435 \u0442\u0438\u043f\u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0438 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c Swashbuckle \u2014 <code>IDocumentFilter<\/code>. \u0412\u043e\u0442 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">public class EnumTypesDocumentFilter : IDocumentFilter {     public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)     {         foreach (var path in swaggerDoc.Paths.Values)         {             foreach(var operation in path.Operations.Values)             {                 foreach(var parameter in operation.Parameters)                 {                     var schemaReferenceId = parameter.Schema.Reference?.Id;                     if (string.IsNullOrEmpty(schemaReferenceId)) continue;                      var schema = context.SchemaRepository.Schemas[schemaReferenceId];                      if (schema.Enum == null || schema.Enum.Count == 0) continue;                      parameter.Description += &quot;&lt;p&gt;Variants:&lt;\/p&gt;&quot;;                      int cutStart = schema.Description.IndexOf(&quot;&lt;ul&gt;&quot;);                     int cutEnd = schema.Description.IndexOf(&quot;&lt;\/ul&gt;&quot;) + 5;                      parameter.Description += schema.Description                         .Substring(cutStart, cutEnd - cutStart);                 }             }         }      } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <code>Apply<\/code> \u043c\u044b \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0437\u0434\u0435\u0441\u044c Swashbuckle API \u043d\u0435 \u0434\u0430\u0451\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u0442\u0438\u043f\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u0441\u0445\u0435\u043c\u0435 \u0435\u0433\u043e \u0442\u0438\u043f\u0430 (\u043d\u0443 \u0438\u043b\u0438 \u044f \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0447\u043b\u0435\u043d\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>DocumentFilter<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cs\">services.AddSwaggerGen(c =&gt; {      \/\/ Set the comments path for the Swagger JSON and UI.     var xmlFile = $&quot;{Assembly.GetExecutingAssembly().GetName().Name}.xml&quot;;     var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);     c.IncludeXmlComments(xmlPath);      c.SchemaFilter&lt;EnumTypesSchemaFilter&gt;(xmlPath);     c.DocumentFilter&lt;EnumTypesDocumentFilter&gt;(); });<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0432 Swagger UI:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bt\/u2\/0q\/btu20q38st04yp0jbkjfvf4zow0.png\" alt=\"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438\"><\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0437\u0434\u0435\u0441\u044c \u043a\u043e\u0434 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u0435\u0435 \u043d\u0430\u0431\u0440\u043e\u0441\u043a\u043e\u043c \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0447\u0435\u043c \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0432\u0430\u043c \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0447\u043b\u0435\u043d\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 \u0432\u0430\u0448 Swagger UI. \u0421\u043f\u0430\u0441\u0438\u0431\u043e!<\/p>\n<p>  <\/p>\n<p>P.S. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/yakimovim\/enum-description-in-swagger\" rel=\"nofollow noopener noreferrer\">GitHub<\/a>.<\/p>\n<\/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\/552624\/\"> https:\/\/habr.com\/ru\/post\/552624\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><a href=\"https:\/\/swagger.io\/\" rel=\"nofollow noopener noreferrer\">Swagger<\/a> \u2014 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0449\u044c! \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u043c API \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0447\u0435\u0440\u0435\u0437 UI. \u0412 ASP.NET Core \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 Swagger \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/github.com\/domaindrivendev\/Swashbuckle.AspNetCore\" rel=\"nofollow noopener noreferrer\">Swashbuckle.AspNetCore<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f. Swashbuckle \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 XML-\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0432 \u043a\u043e\u0434\u0435 .NET. \u041d\u043e \u043e\u043d \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0447\u043b\u0435\u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/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-321579","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321579","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=321579"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321579\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=321579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=321579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=321579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}