Swagger-Web Api documentation (Swashbuckle missing Bootstrapper)

I am trying to use swagger for my documentation on web-api. To do this, I installed Swashbuckle from nuget packages, but I cannot get the Bootstrapper package in the swaggerconfig.cs class. so is there any other alternative to get the bootstrapper package in the swaggerconfig.cs class. Please help me. Thanks.

+6
source share
5 answers

If your service is hosted on IIS, you can start to publish the Swagger docs and the corresponding swagger-ui by simply installing the following Nuget package:

Swashbuckle installation package

This will add a link to Swashbuckle.Core and also automatically install the bootloader.

https://github.com/domaindrivendev/Swashbuckle

Thanks.

+4
source

If Swashbuckle.Bootstrapper.Init(config); is absent. I used an older version of Swashbuckle 4.1.0, which worked for me.

enter image description here

+2
source

I posted a tutorial and code here if you want to look

+1
source

In my case, I solved this by adding a link through WebApiConfig

 public static class WebApiConfig { public static void Register(HttpConfiguration config) { config.MapHttpAttributeRoutes(); config.EnableSwagger(c => { c.SingleApiVersion("v1", "WebAPI"); }).EnableSwaggerUi(); } } 
0
source

It works with Swashbuckle> = 5.6.0

 //namespace using Swashbuckle.Application; var config = new HttpConfiguration(); config.EnableSwagger(c => c.SingleApiVersion("v1", "A title for your API")).EnableSwaggerUi(); 
0
source

Source: https://habr.com/ru/post/984647/


All Articles