Cohesive.Api
0.1.0-alpha.30
dotnet add package Cohesive.Api --version 0.1.0-alpha.30
NuGet\Install-Package Cohesive.Api -Version 0.1.0-alpha.30
<PackageReference Include="Cohesive.Api" Version="0.1.0-alpha.30" />
<PackageVersion Include="Cohesive.Api" Version="0.1.0-alpha.30" />
<PackageReference Include="Cohesive.Api" />
paket add Cohesive.Api --version 0.1.0-alpha.30
#r "nuget: Cohesive.Api, 0.1.0-alpha.30"
#:package Cohesive.Api@0.1.0-alpha.30
#addin nuget:?package=Cohesive.Api&version=0.1.0-alpha.30&prerelease
#tool nuget:?package=Cohesive.Api&version=0.1.0-alpha.30&prerelease
Cohesive.Api
Semantic API declaration primitives for describing operations, endpoints, pagination, scope policies, and generated API artifacts.
This package is host-neutral. HTTP bindings describe portable API intent; they do not reference ASP.NET Core or map runtime routes. Concrete host projection belongs to an adapter.
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 dispatch = compiledDispatchPlan.DefinitionReference;
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(dispatch)
.Done()
.Build();
Optional execution control
The canonical Process execution-control catalog intentionally lives in Cohesive.Api.Execution. That optional
composition package binds these generic declarations to Cohesive.Processes contracts without making every
Cohesive.Api consumer acquire the Process language and runtime.
ASP.NET projection
ASP.NET endpoint mapping lives in Cohesive.Adapters.AspNet. Hosts add that package and import its namespace:
using Cohesive.Adapters.AspNet;
app.MapApiDefinition(api, operation => CreateHandler(operation));
MapApiDefinition, MapApiEndpoint, and AspNetAuthorizationPolicyResolver previously lived in the
Cohesive.Api assembly and namespace. They moved without a forwarding shim so this package can remain independent
of Microsoft.AspNetCore.App.
Related Packages
- Execution Kernel adoption and migration guide for the common status, trace, explain, and telemetry projection contract.
Cohesive.Api.Executionfor the canonical route-neutral Process execution-control catalog and reference integration.Cohesive.Adapters.AspNetfor ASP.NET endpoint projection.Cohesive.Adapters.OpenApifor OpenAPI emission.Cohesive.Adapters.GraphQLfor GraphQL schema emission.Cohesive.Adapters.TypeScriptfor TypeScript client generation.
| 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
- Cohesive (>= 0.1.0-alpha.30)
- Cohesive.Transitions (>= 0.1.0-alpha.30)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Cohesive.Api:
| Package | Downloads |
|---|---|
|
Cohesive.Adapters.GraphQL
Cohesive semantic system definition and orchestration building blocks. |
|
|
Cohesive.Adapters.TypeScript
Cohesive semantic system definition and orchestration building blocks. |
|
|
Cohesive.Adapters.OpenApi
Cohesive semantic system definition and orchestration building blocks. |
|
|
Cohesive.CodeGen.Cli
Cohesive semantic system definition and orchestration building blocks. |
|
|
Cohesive.Relations.Contracts
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.30 | 39 | 8/18/2026 |
| 0.1.0-alpha.29 | 70 | 8/17/2026 |
| 0.1.0-alpha.28 | 80 | 8/17/2026 |
| 0.1.0-alpha.27 | 68 | 8/17/2026 |
| 0.1.0-alpha.26 | 90 | 8/16/2026 |
| 0.1.0-alpha.25 | 71 | 8/16/2026 |
| 0.1.0-alpha.24 | 84 | 8/16/2026 |
| 0.1.0-alpha.23 | 79 | 8/16/2026 |
| 0.1.0-alpha.22 | 76 | 8/16/2026 |
| 0.1.0-alpha.21 | 68 | 8/16/2026 |
| 0.1.0-alpha.20 | 86 | 8/15/2026 |
| 0.1.0-alpha.19 | 71 | 8/15/2026 |
| 0.1.0-alpha.18 | 79 | 8/15/2026 |
| 0.1.0-alpha.17 | 79 | 8/14/2026 |
| 0.1.0-alpha.16 | 82 | 8/13/2026 |
| 0.1.0-alpha.15 | 78 | 8/13/2026 |
| 0.1.0-alpha.14 | 78 | 8/13/2026 |
| 0.1.0-alpha.13 | 84 | 8/12/2026 |
| 0.1.0-alpha.12 | 74 | 8/12/2026 |
| 0.1.0-alpha.11 | 83 | 8/12/2026 |