Cohesive.Adapters.OpenApi 0.1.0-alpha.121

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

Cohesive.Adapters.OpenApi

OpenAPI document emission and endpoint helpers for Cohesive API declarations.

Install

dotnet add package Cohesive.Adapters.OpenApi

Use When

  • You want OpenAPI artifacts generated from Cohesive API declarations.
  • You need endpoint helpers for publishing generated OpenAPI documents.
  • You want OpenAPI, GraphQL, and TypeScript clients to share one semantic API source.

Example

using Cohesive.Adapters.OpenApi;
using Cohesive.Api;

var api = Api.Define("Shipping")
    .Entity<ShipmentDto>()
    .Query("Get")
        .Route("GET", "/shipments/{id}")
        .RouteParameter<string>("id")
        .Returns<ShipmentDto>()
        .Done()
    .Build();

var document = new OpenApiEmitter().Emit(api).Documents.Single();
app.MapCohesiveOpenApi(api);
  • Cohesive.Api for API declarations.
  • Cohesive.CodeGen.Cli for build-time artifact generation.

Public JSON contracts

Supply OpenApiEmitterOptions.JsonSerializerOptions to project a public document contract from the same serializer metadata used on the wire. This supports recursive records, explicit polymorphic cases and converter-backed scalar identifiers while keeping portable document storage admission separate. The CLI selects this profile with --shape-projection canonical-json for OpenAPI as well as shapes.

The profile rejects property-specific converters/number-handling overrides and polymorphic cases without explicit discriminators. Unknown converter output stays opaque; CLR implementation members are not substituted for a converter schema. Native document semantic validation remains authoritative. See typed portable JSON contracts for the projection boundary and qualification.

Nested serializer profiles

A property converter implementing IJsonValueSerializerProfile declares the frozen options it uses for the complete nested value. OpenAPI follows that profile instead of applying the envelope's naming and converter rules. WebJsonPropertyConverter<T> exposes its existing shared web profile. Each profile receives a separate type-to-schema cache within an emission; component names remain unique across profiles. Recursive references therefore preserve the selected profile even when the same CLR type is also serialized by the outer envelope. Mutable profiles and unrecognized custom property converters remain unsupported with explicit diagnostics. This support does not imply profile-aware TypeScript or GraphQL projection.

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 (1)

Showing the top 1 NuGet packages that depend on Cohesive.Adapters.OpenApi:

Package Downloads
Cohesive.CodeGen.Cli

Cohesive semantic system definition and orchestration building blocks.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha.121 6 10/2/2026
0.1.0-alpha.120 52 9/29/2026
0.1.0-alpha.119 38 9/29/2026
0.1.0-alpha.118 58 9/29/2026
0.1.0-alpha.117 64 9/27/2026
0.1.0-alpha.116 61 9/26/2026
0.1.0-alpha.115 73 9/26/2026
0.1.0-alpha.114 63 9/24/2026
0.1.0-alpha.113 66 9/24/2026
0.1.0-alpha.112 66 9/23/2026
0.1.0-alpha.111 68 9/23/2026
0.1.0-alpha.110 62 9/23/2026
0.1.0-alpha.109.1 60 9/23/2026
0.1.0-alpha.109 58 9/23/2026
0.1.0-alpha.108 66 9/21/2026
0.1.0-alpha.107 54 9/21/2026
0.1.0-alpha.106 62 9/21/2026
0.1.0-alpha.105 54 9/21/2026
0.1.0-alpha.104 74 9/21/2026
0.1.0-alpha.103 64 9/21/2026
Loading failed