Cohesive.Api 0.1.0-alpha.3

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

Cohesive.Api

Semantic API declaration primitives for describing operations, endpoints, pagination, scope policies, and generated API artifacts.

Install

dotnet add package Cohesive.Api

Use When

  • You want an API surface to be declared as semantic operations before projecting it to HTTP, OpenAPI, GraphQL, or TypeScript clients.
  • You need shared endpoint metadata that can be interpreted by multiple adapters.
  • You want API declarations to stay close to Cohesive shapes, presentation modules, relations, or process definitions.

Example

using Cohesive.Api;

var api = Api.Define("Shipping")
    .Entity<Shipment>()
    .Query("GetById")
        .Route("GET", "/api/shipments/{id}")
        .Returns<ShipmentDto>()
        .Done()
    .Command("Dispatch")
        .Route("POST", "/api/shipments/{id}/dispatch")
        .Accepts<DispatchShipmentRequest>()
        .Transition(new(name: "Dispatch"))
        .Done()
    .Build();
  • Cohesive.Adapters.AspNet for ASP.NET endpoint projection.
  • Cohesive.Adapters.OpenApi for OpenAPI emission.
  • Cohesive.Adapters.GraphQL for GraphQL schema emission.
  • Cohesive.Adapters.TypeScript for TypeScript client generation.
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 (6)

Showing the top 5 NuGet packages that depend on Cohesive.Api:

Package Downloads
Cohesive.Adapters.OpenApi

Cohesive semantic system definition and orchestration building blocks.

Cohesive.Adapters.AspNet

Cohesive semantic system definition and orchestration building blocks.

Cohesive.Adapters.GraphQL

Cohesive semantic system definition and orchestration building blocks.

Cohesive.Adapters.TypeScript

Cohesive semantic system definition and orchestration building blocks.

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.3 54 7/8/2026
0.1.0-alpha.2 62 7/7/2026