Fluent.Unions.OpenApi 1.1.0

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

Fluent.Unions

Fluent.Unions.OpenApi

NuGet Downloads Publish Documentation

Describes Option<T> as a nullable T in the documents that Microsoft.AspNetCore.OpenApi generates. It builds on Fluent.Unions and matches the JSON shape of an option: the value, or null for none.

Installation

dotnet add package Fluent.Unions.OpenApi

Usage

Register the schema transformer. Without it, an option is an object without a type.

using Fluent.Unions.OpenApi;

builder.Services.AddOpenApi(options => options.AddFluentUnions());

app.MapOpenApi();

Options in a request or response body then become nullable types, so generated clients see them.

public record Product(string Name, Option<string> Nickname, Option<int> Stock);
// "nickname": type ["null", "string"], "stock": type ["null", "integer", "string"] with format int32

An option property stays in required, because it is always written, as null for none. For Swashbuckle and NSwag, use Fluent.Unions.Swashbuckle and Fluent.Unions.NSwag.

Documentation

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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 88 11/22/2026
1.0.0 91 11/21/2026
0.3.0 98 11/20/2026
0.2.0 88 11/19/2026
0.1.0 91 11/19/2026