MinimalEndpoints.Swashbuckle.AspNetCore
1.1.0
dotnet add package MinimalEndpoints.Swashbuckle.AspNetCore --version 1.1.0
NuGet\Install-Package MinimalEndpoints.Swashbuckle.AspNetCore -Version 1.1.0
<PackageReference Include="MinimalEndpoints.Swashbuckle.AspNetCore" Version="1.1.0" />
paket add MinimalEndpoints.Swashbuckle.AspNetCore --version 1.1.0
#r "nuget: MinimalEndpoints.Swashbuckle.AspNetCore, 1.1.0"
// Install MinimalEndpoints.Swashbuckle.AspNetCore as a Cake Addin #addin nuget:?package=MinimalEndpoints.Swashbuckle.AspNetCore&version=1.1.0 // Install MinimalEndpoints.Swashbuckle.AspNetCore as a Cake Tool #tool nuget:?package=MinimalEndpoints.Swashbuckle.AspNetCore&version=1.1.0
MinimalEndpoints.Swashbuckle.AspNetCore
A supporting library for MinimalEndpoints that integrates with the SwaggerGenUI for better API documentation.
Why use MinimalEndpoints.Swashbuckle.AspNetCore?
MinimalEndpoints.Swashbuckle.AspNetCore enalbes the use of xml comment files for richer API documentation.
Installing MinimalEndpoints.Swashbuckle.AspNetCore
You should install MinimalEndpoints.Swashbuckle.AspNetCore with NuGet:
Install-Package MinimalEndpoints.Swashbuckle.AspNetCore
Or via the .NET command line interface (.NET CLI):
dotnet add package MinimalEndpoints.Swashbuckle.AspNetCore
Either commands, from Package Manager Console or .NET Core CLI, will allow download and installation of MinimalEndpoints and all its required dependencies.
How do I get started?
First, configure MinimalEndpoints to know where the commands are located, in the startup of your application:
//add minimal endpoint swagger support
builder.Services.AddMinimalEndpointSwaggerGen();
builder.Services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo
{
Title = "Minimal Endpoint API Demo",
Version = "v1",
Description = "An API developed using MinimalEndpoint",
TermsOfService = new Uri("https://example.com/terms"),
Contact = new OpenApiContact
{
Name = "Nyron Williams",
Url = new Uri("https://github.com/nyronw"),
},
License = new OpenApiLicense
{
Name = "Minimal Endpoint License",
Url = new Uri("https://example.com/license"),
}
});
//Set the comments path for the Swagger JSON and UI.
var xmlFiles = Directory.GetFiles(AppContext.BaseDirectory)
.Where(f => Path.GetExtension(f) == ".xml");
c.IncludeXmlComments(xmlFiles);
});
V1.1 Breaking Changes
- Requires that AddMinimalEndpointSwaggerGen() method be called on the IServiceCollection interface during application startup.
- Swagger UI IncludeXmlComments extension method no longer accepts an instance of EndpointDescriptor;
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- MinimalEndpoints (>= 1.4.0)
- Swashbuckle.AspNetCore (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.