Autogenerated docs with Swagger.
Adds API documentation using Swagger or ReDoc.

dotnet add package Convey.Docs.Swagger
Enabled - determines whether documentation is enabledReDocEnabled - if false SwaggerUI is used to render documentation. Otherwise uses ReDocName - name of the documentationTitle - title of the documentationVersion - version of the documentationRoutePrefix - endpoint at which the documentation is going to be availableIncludeSecurity - determines whether documentation security (via JWT) is going to be activated "swagger": {
"enabled": true,
"reDocEnabled": false,
"name": "v1",
"title": "API",
"version": "v1",
"routePrefix": "docs",
"includeSecurity": true
},
Inside Startup.cs extend IConveyBuilder with AddSwaggerDocs() and IApplicationBuilder with UseSwaggerDocs():
public IServiceProvider ConfigureServices(this IServiceCollection services)
{
var builder = services.AddConvey()
.AddSwaggerDocs();
//other registrations
return builder.Build();
}
public void Configure(this IApplicationBuilder app)
{
app.UseSwaggerDocs();
}
Having this done your docs should be available at http://{host}:{port}/{routePrefix}