Skip to content

Swagger

Furkan Güngör edited this page Apr 24, 2022 · 1 revision

Summary

The EasyWeb.AspNetCore.Swagger library provides easy configuration. Just set the Name and Description.

Step 1 : Install Package

Install EasyWeb.AspNetCore.Swagger from Nuget

Step 2 : Configuration

builder.Services.ConfigureSwagger(options =>
{
    options.Title = "Demo Service Title";
    options.Description = "Demo Service Description";
});

and

app.ApplySwaggerConfiguration();

Step 3 : Api Version

using EasyWeb.AspNetCore.Controllers;

[ApiVersion("1.0")] // or 2.0, 2.1 ...
public class YourController : BaseApiController
{
    // Rest of your stuffs.
}

Result

Swagger UI — Mozilla Firefox 2022-04-25 00-01-35

Welcome to the EasyWeb wiki!

Topics:

Clone this wiki locally