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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MinimalEndpoints.Swashbuckle.AspNetCore" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MinimalEndpoints.Swashbuckle.AspNetCore --version 1.1.0                
#r "nuget: MinimalEndpoints.Swashbuckle.AspNetCore, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 72 12/10/2024
1.0.7 104 11/13/2024
1.0.6 87 11/13/2024
1.0.5 183 4/2/2024
1.0.4 128 4/1/2024
1.0.3 124 4/1/2024
1.0.0 155 3/6/2024