RsqlParserNet.OpenApi
1.0.3
dotnet add package RsqlParserNet.OpenApi --version 1.0.3
NuGet\Install-Package RsqlParserNet.OpenApi -Version 1.0.3
<PackageReference Include="RsqlParserNet.OpenApi" Version="1.0.3" />
<PackageVersion Include="RsqlParserNet.OpenApi" Version="1.0.3" />
<PackageReference Include="RsqlParserNet.OpenApi" />
paket add RsqlParserNet.OpenApi --version 1.0.3
#r "nuget: RsqlParserNet.OpenApi, 1.0.3"
#:package RsqlParserNet.OpenApi@1.0.3
#addin nuget:?package=RsqlParserNet.OpenApi&version=1.0.3
#tool nuget:?package=RsqlParserNet.OpenApi&version=1.0.3
RsqlParserNet.OpenApi
Endpoint-scoped OpenAPI documentation for the filter, sort, page, and pageSize query parameters, using ASP.NET Core's built-in OpenAPI (Microsoft.AspNetCore.OpenApi). It documents the parameters only; filtering, sorting, paging, and validation come from the other packages.
Part of the RsqlParserNet family. It builds on the RsqlParserNet.AspNetCore query models, which build on the RsqlParserNet core parser. For other OpenAPI stacks, use RsqlParserNet.Swashbuckle (Swashbuckle / SwaggerGen) or RsqlParserNet.NSwag (NSwag and FastEndpoints.Swagger-style generation).
Installation
dotnet add package RsqlParserNet.OpenApi
Quick start
Call WithRsqlQueryParameters() on an endpoint that accepts RsqlQueryRequest. It registers an OpenAPI operation transformer that documents the four query parameters as optional:
using RsqlParserNet.AspNetCore;
using RsqlParserNet.OpenApi;
app.MapGet("/products", async (
RsqlQueryRequest request,
AppDbContext db,
CancellationToken cancellationToken) =>
{
// endpoint implementation
})
.WithName("ListProducts")
.WithRsqlQueryParameters();
By default this documents filter, sort, page, and pageSize.
Use the configuration callback to align names with AddRsqlQueryRequest(...) or to document only the parts an endpoint supports:
app.MapGet("/products/search", HandleSearch)
.WithRsqlQueryParameters(options =>
{
options.FilterParameterName = "q";
options.IncludeSort = false;
options.IncludePagination = false;
});
API
| Member | Description |
|---|---|
RsqlOpenApiEndpointConventionBuilderExtensions.WithRsqlQueryParameters<TBuilder>(this TBuilder, Action<RsqlOpenApiQueryOptions>?) |
Endpoint convention builder extension that registers an OpenAPI operation transformer documenting the RSQL query parameters. Returns the builder. |
RsqlOpenApiOperationDocumenter.Apply(OpenApiOperation, RsqlOpenApiQueryOptions?) |
Adds the configured query parameters to an OpenApiOperation. Use this to compose RSQL documentation inside an application's own operation transformer. Skips parameters already present by name in the query. |
RsqlOpenApiQueryOptions |
Configures which parameters are documented, their names, and their descriptions. |
RsqlOpenApiQueryOptions properties:
| Property | Default | Purpose |
|---|---|---|
IncludeFilter |
true |
Document the filter parameter. |
IncludeSort |
true |
Document the sort parameter. |
IncludePagination |
true |
Document the page and page size parameters. |
FilterParameterName |
RsqlQueryFilter.DefaultQueryParameterName |
Filter parameter name. |
SortParameterName |
RsqlSortQuery.DefaultSortParameterName |
Sort parameter name. |
PageParameterName |
RsqlPageQuery.DefaultPageParameterName |
Page parameter name. |
PageSizeParameterName |
RsqlPageQuery.DefaultPageSizeParameterName |
Page size parameter name. |
FilterDescription |
RSQL filter example text | Filter parameter description. |
SortDescription |
Sort field example text | Sort parameter description. |
PageDescription |
"One-based page number." |
Page parameter description. |
PageSizeDescription |
"Number of items requested per page." |
Page size parameter description. |
Documentation
- OpenAPI usage: docs/openapi-usage.md
- Main repository: RsqlParserNet
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Microsoft.AspNetCore.OpenApi (>= 10.0.0)
- RsqlParserNet.AspNetCore (>= 1.0.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on RsqlParserNet.OpenApi:
| Package | Downloads |
|---|---|
|
RsqlParserNet.Swashbuckle
Swashbuckle operation filter helpers for documenting RsqlParserNet query parameters. |
|
|
RsqlParserNet.NSwag
NSwag operation processor helpers for documenting RsqlParserNet query parameters. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.3 | 120 | 6/16/2026 |
| 1.0.2 | 118 | 5/23/2026 |
| 1.0.1 | 127 | 5/18/2026 |
| 1.0.0 | 129 | 5/10/2026 |
| 0.3.0-preview.1 | 56 | 5/6/2026 |
| 0.2.0-preview.1 | 130 | 5/5/2026 |
Maintenance release aligning the RsqlParserNet package family at 1.0.3 and adding a dedicated package README.