EricksonLopez.Pagination.OpenApi
0.0.0-alpha.0
dotnet add package EricksonLopez.Pagination.OpenApi --version 0.0.0-alpha.0
NuGet\Install-Package EricksonLopez.Pagination.OpenApi -Version 0.0.0-alpha.0
<PackageReference Include="EricksonLopez.Pagination.OpenApi" Version="0.0.0-alpha.0" />
<PackageVersion Include="EricksonLopez.Pagination.OpenApi" Version="0.0.0-alpha.0" />
<PackageReference Include="EricksonLopez.Pagination.OpenApi" />
paket add EricksonLopez.Pagination.OpenApi --version 0.0.0-alpha.0
#r "nuget: EricksonLopez.Pagination.OpenApi, 0.0.0-alpha.0"
#:package EricksonLopez.Pagination.OpenApi@0.0.0-alpha.0
#addin nuget:?package=EricksonLopez.Pagination.OpenApi&version=0.0.0-alpha.0&prerelease
#tool nuget:?package=EricksonLopez.Pagination.OpenApi&version=0.0.0-alpha.0&prerelease
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, andbeforequery parameters. - Filter and Sort injection: If you accept
FilterParametersorSortParametersvia a model binder, but the OpenAPI generator fails to discover them, this package will automatically injectfilterandsortByas string query parameters with proper examples and descriptions (e.g.,name~=John,age>=18).
| 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. 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. |
-
net10.0
- EricksonLopez.Pagination (>= 0.0.0-alpha.0)
- Microsoft.AspNetCore.OpenApi (>= 9.0.2)
- Microsoft.OpenApi (>= 1.6.22)
- Swashbuckle.AspNetCore.SwaggerGen (>= 6.5.0)
-
net8.0
- EricksonLopez.Pagination (>= 0.0.0-alpha.0)
- Microsoft.OpenApi (>= 1.6.22)
- Swashbuckle.AspNetCore.SwaggerGen (>= 6.5.0)
-
net9.0
- EricksonLopez.Pagination (>= 0.0.0-alpha.0)
- Microsoft.AspNetCore.OpenApi (>= 9.0.2)
- Microsoft.OpenApi (>= 1.6.22)
- Swashbuckle.AspNetCore.SwaggerGen (>= 6.5.0)
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 |