Goldpath.ApiDefaults
0.1.0-preview.8
dotnet add package Goldpath.ApiDefaults --version 0.1.0-preview.8
NuGet\Install-Package Goldpath.ApiDefaults -Version 0.1.0-preview.8
<PackageReference Include="Goldpath.ApiDefaults" Version="0.1.0-preview.8" />
<PackageVersion Include="Goldpath.ApiDefaults" Version="0.1.0-preview.8" />
<PackageReference Include="Goldpath.ApiDefaults" />
paket add Goldpath.ApiDefaults --version 0.1.0-preview.8
#r "nuget: Goldpath.ApiDefaults, 0.1.0-preview.8"
#:package Goldpath.ApiDefaults@0.1.0-preview.8
#addin nuget:?package=Goldpath.ApiDefaults&version=0.1.0-preview.8&prerelease
#tool nuget:?package=Goldpath.ApiDefaults&version=0.1.0-preview.8&prerelease
Goldpath.ApiDefaults
API surface conventions of the Goldpath golden path: URL-segment versioning, the keyset cursor-pagination primitive, JSON wire defaults, and deterministic OpenAPI export (net10).
Getting started
builder.AddGoldpathApiDefaults();
var app = builder.Build();
var api = app.MapGoldpathApi(); // /api/v1/... — versioned root group
api.MapGet("/orders", ...); // → GET /api/v1/orders
api.MapMediantEndpoints(); // Mediant [HttpEndpoint] commands/queries attach here
Configuration
Deliberately minimal — the conventions ARE the configuration. Page size bounds are
constants of the wire contract (PageRequest.DefaultSize = 50, MaxSize = 200).
Advanced
Cursor pagination (executor ships with Goldpath.Data; the contract lives here):
api.MapGet("/orders", async (string? cursor, int size, OrdersDb db) =>
{
var request = new PageRequest(cursor, size);
// Goldpath.Data: keyset ToPageAsync reads/writes GoldpathCursor — no Skip/Take, ever.
Page<OrderDto> page = await db.Orders.OrderBy(...).ToPageAsync(request);
return page; // { "items": [...], "nextCursor": "…", "size": 50 }
});
- Cursors are opaque: base64url keyset payloads; a tampered cursor fails
GoldpathCursor.TryDecode→ return 400. No total count by design (RFC D2) — expose an explicit aggregate endpoint if a consumer truly needs one. - JSON wire: camelCase, enums as strings, nulls not written.
- OpenAPI: interactive endpoint in Development only; CI consumes the build-time export
as the Spec Engine
driftinput (net10 targets only — net8 consumers keep their setup).
Providers
Not applicable.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Asp.Versioning.Http (>= 8.1.1)
- Goldpath.Abstractions (>= 0.1.0-preview.8)
- Mediant (>= 1.4.1)
- Mediant.AspNetCore (>= 1.4.1)
- Microsoft.AspNetCore.OpenApi (>= 10.0.9)
- Microsoft.OpenApi (>= 2.12.2)
-
net8.0
- Asp.Versioning.Http (>= 8.1.1)
- Goldpath.Abstractions (>= 0.1.0-preview.8)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Goldpath.ApiDefaults:
| Package | Downloads |
|---|---|
|
Goldpath.Data
Data-path floor of the Goldpath enterprise asset: keyset cursor-pagination executor, the save-contributor seam for Ring B modules, and model conventions (UTC temporal policy, precision/length defaults, TenantId conversion). Provider-neutral on EF Core Relational. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.8 | 170 | 9/7/2026 |
| 0.1.0-preview.7 | 137 | 9/1/2026 |
| 0.1.0-preview.6 | 416 | 8/4/2026 |
| 0.1.0-preview.5 | 123 | 7/28/2026 |
| 0.1.0-preview.4 | 117 | 7/27/2026 |
| 0.1.0-preview.3 | 101 | 7/25/2026 |
| 0.1.0-preview.2 | 110 | 7/13/2026 |
| 0.1.0-preview.1 | 279 | 7/13/2026 |