Yes, ASP.NET Core 3.0 supports Swashbuckle.
1) You can simply install it by running the follow command in Package Manager Console:
Install-Package Swashbuckle.AspNetCore -Version 5.0.0-rc3
2) Then add the Swagger generator to the services collection in the Startup.ConfigureServices
method:
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
});
3) In Startup.Configure
method, add these two to enable the middleware for serving the generated JSON document and the Swagger UI:
// Enable middleware to serve generated Swagger as a JSON endpoint.
app.UseSwagger();
// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
// specifying the Swagger JSON endpoint.
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
});
To customize it, you can check complete guide here:
https://learn.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle?view=aspnetcore-3.0&tabs=visual-studio