APIWeaver 2.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package APIWeaver --version 2.2.0
                    
NuGet\Install-Package APIWeaver -Version 2.2.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="APIWeaver" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="APIWeaver" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="APIWeaver" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add APIWeaver --version 2.2.0
                    
#r "nuget: APIWeaver, 2.2.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.
#:package APIWeaver@2.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=APIWeaver&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=APIWeaver&version=2.2.0
                    
Install as a Cake Tool

APIWeaver

Pipeline Coverage NuGet Version NuGet Downloads

APIWeaver is a powerful and lightweight library that integrates Swagger UI and OpenAPI support into your .NET 9 applications. It is designed to be user-friendly, fully configurable, and AOT compatible. Built on top of Microsoft's built-in OpenAPI document generation, the library offers a range of extension methods and transformers to enhance OpenAPI documents and operations.

Getting Started

Getting up and running with APIWeaver is simple:

  1. Install the NuGet package
dotnet add package APIWeaver
  1. Add the necessary using directive
using APIWeaver;
  1. Configure your application

Add the following lines to your Program.cs file to set up APIWeaver:

builder.Services.AddOpenApiDocument();

// other code

if (app.Environment.IsDevelopment())
{
    app.MapOpenApi();
    app.MapSwaggerUi();
}

That's it! Your application now has a fully functional, native AOT-compatible Swagger UI. To view it, simply navigate to /swagger in your browser 🥳. For more advanced configuration options, check out the documentation.

Currently supported features

  • Fully functional and configurable Swagger UI
  • Dark mode 🌙
  • Native AOT compatible
  • Useful extension methods
  • Useful transformers for OpenAPI documents and operations

Roadmap

  • More useful transformers for OpenAPI documents and operations.
  • Support for more OpenAPI UIs
  • Later: API client generation based on the generated OpenAPI document

Work in progress

This project is currently under active development, with ongoing improvements, new features and potential API changes. If you have any feedback, feature requests or issues, please feel free to open an issue or a pull request.

Contribution and Collaboration

Your contributions to this project are welcomed and encouraged. Your active involvement can significantly impact its success!

License

Distributed under the MIT License. See LICENSE for more information. This means APIWeaver will always remain free.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
2.5.0-preview.3 155 9/23/2024
2.5.0-preview.2 76 9/22/2024
2.5.0-preview.1 72 9/22/2024
2.4.2 471 10/9/2024
2.4.1 120 9/13/2024
2.4.0 133 9/6/2024
2.3.0 136 9/3/2024
2.2.0 135 8/28/2024
2.1.0 139 8/27/2024
2.0.0 141 8/26/2024
2.0.0-preview.3 87 8/25/2024
2.0.0-preview.2 95 8/25/2024