EricksonLopez.Pagination.OpenApi 0.0.0-alpha.0

This is a prerelease version of EricksonLopez.Pagination.OpenApi.
dotnet add package EricksonLopez.Pagination.OpenApi --version 0.0.0-alpha.0
                    
NuGet\Install-Package EricksonLopez.Pagination.OpenApi -Version 0.0.0-alpha.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="EricksonLopez.Pagination.OpenApi" Version="0.0.0-alpha.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EricksonLopez.Pagination.OpenApi" Version="0.0.0-alpha.0" />
                    
Directory.Packages.props
<PackageReference Include="EricksonLopez.Pagination.OpenApi" />
                    
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 EricksonLopez.Pagination.OpenApi --version 0.0.0-alpha.0
                    
#r "nuget: EricksonLopez.Pagination.OpenApi, 0.0.0-alpha.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 EricksonLopez.Pagination.OpenApi@0.0.0-alpha.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=EricksonLopez.Pagination.OpenApi&version=0.0.0-alpha.0&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=EricksonLopez.Pagination.OpenApi&version=0.0.0-alpha.0&prerelease
                    
Install as a Cake Tool

EricksonLopez.Pagination.OpenApi

Swagger and OpenAPI pagination documentation extensions for the EricksonLopez.Pagination ecosystem.

Overview

This package enriches your auto-generated OpenAPI documentation to correctly describe pagination parameters, filtering, and sorting parameters for methods that use PaginationParameters, CursorPaginationParameters, FilterParameters, or SortParameters.

It supports both the popular Swashbuckle.AspNetCore library and the native .NET 9+ Microsoft.AspNetCore.OpenApi implementation.

Installation

<PackageReference Include="EricksonLopez.Pagination.OpenApi" Version="[VERSION]" />

Usage

Swashbuckle (ASP.NET Core 8+)

If you are using Swashbuckle.AspNetCore, register the pagination operation filter in your SwaggerGen options:

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddSwaggerGen(c =>
{
    c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
    
    // Add EricksonLopez.Pagination support to Swashbuckle
    c.AddPaginationSupport();
});

Note: Swashbuckle relies heavily on reflection and is not compatible with Native AOT or aggressive trimming.

Microsoft.AspNetCore.OpenApi (.NET 9+)

If you are using the native .NET 9 OpenAPI implementation (Microsoft.AspNetCore.OpenApi), register the operation transformer in your OpenApi options:

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddOpenApi(options =>
{
    // Add EricksonLopez.Pagination support to native OpenAPI
    options.AddPaginationSupport();
});

Note: The native OpenAPI implementation in .NET 9 is AOT-friendly and trimming-safe.

Features

  • Parameter Descriptions: Automatically adds human-readable descriptions to page, pageSize, first, last, after, and before query parameters.
  • Filter and Sort injection: If you accept FilterParameters or SortParameters via a model binder, but the OpenAPI generator fails to discover them, this package will automatically inject filter and sortBy as string query parameters with proper examples and descriptions (e.g., name~=John,age>=18).
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.  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 is compatible.  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
0.0.0-alpha.0 60 8/25/2026