RsqlParserNet.NSwag 1.1.0

dotnet add package RsqlParserNet.NSwag --version 1.1.0
                    
NuGet\Install-Package RsqlParserNet.NSwag -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="RsqlParserNet.NSwag" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RsqlParserNet.NSwag" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="RsqlParserNet.NSwag" />
                    
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 RsqlParserNet.NSwag --version 1.1.0
                    
#r "nuget: RsqlParserNet.NSwag, 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.
#:package RsqlParserNet.NSwag@1.1.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=RsqlParserNet.NSwag&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=RsqlParserNet.NSwag&version=1.1.0
                    
Install as a Cake Tool

RsqlParserNet.NSwag

RsqlParserNet.NSwag NuGet RsqlParserNet.NSwag Downloads

NSwag operation processors that document the filter, sort, page, and pageSize query parameters in Swagger/OpenAPI documents generated through NSwag, including APIs that use FastEndpoints.Swagger.

Part of the RsqlParserNet family. It builds on RsqlParserNet.AspNetCore (and the core RsqlParserNet parser) and references NSwag.Generation.AspNetCore. For other OpenAPI stacks, use RsqlParserNet.OpenApi for ASP.NET Core's built-in OpenAPI document generation, or RsqlParserNet.Swashbuckle for Swashbuckle.

Installation

dotnet add package RsqlParserNet.NSwag

Quick start

Register the endpoint-scoped operation processor once on the NSwag document generator settings:

using RsqlParserNet.NSwag;

builder.Services.AddOpenApiDocument(options =>
{
    options.AddRsqlQueryParametersOperationProcessor();
});

Then mark only the endpoints that accept RSQL query parameters:

app.MapGet("/products", HandleProducts)
    .WithRsqlNSwagQueryParameters();

By default this documents the optional filter, sort, page, and pageSize query parameters.

Customize parameter names (keep them aligned with AddRsqlQueryRequest(...)) and document partial query contracts:

app.MapGet("/products/search", HandleSearch)
    .WithRsqlNSwagQueryParameters(options =>
    {
        options.FilterParameterName = "q";
        options.IncludeSort = false;
        options.IncludePagination = false;
    });

For small APIs where every list endpoint shares the same query contract, document every operation with a single global processor instead:

builder.Services.AddOpenApiDocument(options =>
{
    options.AddRsqlQueryParametersToAllOperations();
});

Endpoint-scoped documentation is the safer default for larger APIs because it avoids advertising query parameters on endpoints that do not accept them.

API

Member Kind Description
RsqlNSwagDocumentGeneratorSettingsExtensions.AddRsqlQueryParametersOperationProcessor(this TSettings) Settings extension Registers an endpoint-scoped operation processor. Only endpoints marked with WithRsqlNSwagQueryParameters(...) are documented.
RsqlNSwagDocumentGeneratorSettingsExtensions.AddRsqlQueryParametersToAllOperations(this TSettings, Action<RsqlOpenApiQueryOptions>?) Settings extension Registers a processor that documents RSQL query parameters on every operation.
RsqlNSwagEndpointConventionBuilderExtensions.WithRsqlNSwagQueryParameters(this TBuilder, Action<RsqlOpenApiQueryOptions>?) Endpoint extension Marks an endpoint as accepting RSQL query parameters and configures which parameters and names to document.
RsqlNSwagOperationDocumenter.Apply(OpenApiOperation, RsqlOpenApiQueryOptions?) Static helper Adds configured RSQL query parameters to an NSwag operation. Use it to compose RSQL documentation inside your own operation processor.
RsqlNSwagQueryParametersOperationProcessor Operation processor The IOperationProcessor registered by AddRsqlQueryParametersOperationProcessor. Documents endpoints carrying RSQL metadata.
RsqlNSwagAllQueryParametersOperationProcessor Operation processor The IOperationProcessor registered by AddRsqlQueryParametersToAllOperations. Documents every operation.
RsqlNSwagQueryMetadata Endpoint metadata Carries the RsqlOpenApiQueryOptions attached by WithRsqlNSwagQueryParameters.

Parameter names, descriptions, and inclusion flags (FilterParameterName, SortParameterName, PageParameterName, PageSizeParameterName, IncludeFilter, IncludeSort, IncludePagination, and related descriptions) come from RsqlOpenApiQueryOptions in RsqlParserNet.OpenApi.

Documentation

Product 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. 
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 113 7/9/2026
1.0.3 136 6/16/2026
1.0.2 114 5/23/2026
1.0.1 107 5/18/2026
1.0.0 116 5/10/2026
0.3.0-preview.1 60 5/6/2026

Minor release updating the transitive Microsoft.OpenApi dependency to 2.7.5 to address CVE-2026-49451 (GHSA-v5pm-xwqc-g5wc).