NowAround.SharedKernel.Contracts 0.2.1-ci.254

NowAround.SharedKernel.Contracts

Shared HTTP contract types for NowAround services.

Features

  • Cursor pagination request model.
  • Cursor pagination response model.
  • Link metadata for current, next, and previous pages.
  • Validation attributes for common HTTP input constraints.

Installation

dotnet add package NowAround.SharedKernel.Contracts

Cursor Pagination

Use CursorPageRequest for endpoints that accept cursor-based pagination:

using NowAround.SharedKernel.Contracts.Http.Pagination;

app.MapGet("/items", async ([AsParameters] CursorPageRequest request) =>
{
    int limit = request.Limit ?? 25;
    string? cursor = request.Cursor;

    // Query one page of data and calculate the next cursor.
});

CursorPageRequest contains:

  • Limit: optional page size. Valid range is 1 through 100.
  • Cursor: optional opaque cursor. Maximum length is 512 characters.

Return CursorPageResponse<TItem> from APIs that expose cursor-based lists:

var response = new CursorPageResponse<ItemDto>(
    Items: items,
    PageInfo: new CursorPageInfo(
        PageSize: items.Count,
        HasNextPage: nextCursor is not null,
        NextCursor: nextCursor),
    Links: new CursorPageLinks(
        Self: currentUrl,
        Next: nextUrl));

CursorPageResponse<TItem> contains:

  • Items: current page data.
  • PageInfo: page size, next-page flag, and next cursor.
  • Links: optional navigation URLs.

Contract Rules

Keep cursors opaque to consumers. Services may encode internal ordering, filters, or continuation state, but clients should only pass the cursor value back to the API.

Showing the top 20 packages that depend on NowAround.SharedKernel.Contracts.

Packages Downloads
NowAround.Identity.Client
Package Description
11
NowAround.Identity.Contracts
Package Description
11
NowAround.Area.Client
Typed HTTP client for the NowAround Area API.
11
NowAround.Area.Contracts
HTTP contracts for the NowAround Area API.
11
NowAround.Area.Contracts
HTTP contracts for the NowAround Area API.
9
NowAround.Identity.Client
Typed Refit client and service registrations for the NowAround Identity service.
8
NowAround.Identity.Contracts
Request and response contracts for the NowAround Identity service.
8
NowAround.Area.Client
Typed HTTP client for the NowAround Area API.
8
NowAround.Identity.Client
Typed Refit client and service registrations for the NowAround Identity service.
7
NowAround.Identity.Contracts
Request and response contracts for the NowAround Identity service.
7
NowAround.Identity.Client
Typed Refit client and service registrations for the NowAround Identity service.
6
NowAround.Identity.Contracts
Request and response contracts for the NowAround Identity service.
6
NowAround.Area.Client
Typed HTTP client for the NowAround Area API.
6
NowAround.Area.Contracts
HTTP contracts for the NowAround Area API.
6
NowAround.Identity.Client
Typed Refit client and service registrations for the NowAround Identity service.
5
NowAround.Identity.Contracts
Request and response contracts for the NowAround Identity service.
5
NowAround.Area.Client
Typed HTTP client for the NowAround Area API.
4
NowAround.Area.Contracts
HTTP contracts for the NowAround Area API.
4

.NET 10.0

  • No dependencies.

Version Downloads Last updated
0.3.0 30 06/03/2026
0.2.1-ci.254 3 06/01/2026
0.2.0 11 06/01/2026
0.2.0-ci.235 5 05/30/2026
0.2.0-ci.218 11 05/26/2026
0.1.1-ci.214 2 05/23/2026
0.1.0 13 05/19/2026
0.0.1 19 05/15/2026