Cohesive.Api
0.1.0-alpha.3
dotnet add package Cohesive.Api --version 0.1.0-alpha.3
NuGet\Install-Package Cohesive.Api -Version 0.1.0-alpha.3
<PackageReference Include="Cohesive.Api" Version="0.1.0-alpha.3" />
<PackageVersion Include="Cohesive.Api" Version="0.1.0-alpha.3" />
<PackageReference Include="Cohesive.Api" />
paket add Cohesive.Api --version 0.1.0-alpha.3
#r "nuget: Cohesive.Api, 0.1.0-alpha.3"
#:package Cohesive.Api@0.1.0-alpha.3
#addin nuget:?package=Cohesive.Api&version=0.1.0-alpha.3&prerelease
#tool nuget:?package=Cohesive.Api&version=0.1.0-alpha.3&prerelease
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();
Related Packages
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.3)
- Cohesive.Transitions (>= 0.1.0-alpha.3)
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 |