Table of Contents

Namespace Trellis.Asp

Classes

ActionResultAdapterExtensions

MVC adapter that wraps an IResult in an ActionResult<TValue> so MVC controllers can declare typed return signatures (e.g. Task<ActionResult<TodoResponse>>) for OpenAPI inference and [ProducesResponseType<T>] compatibility.

AggregateRepresentationValidator<T>

Default representation validator for aggregates. Uses the aggregate's built-in ETag. When a variant key is provided, combines it with the ETag using a hash.

ETagHelper

RFC 9110-compliant entity tag comparison helpers.

HttpResponseExtensions

The single Trellis verb for converting Result<TValue> / WriteOutcome<T> / Page<T> values to ASP.NET Core HTTP responses. Works in both Minimal API endpoints and MVC controllers (.NET 7+ executes IResult natively in MVC). For typed ActionResult<T> signatures, chain AsActionResult<T>(IResult).

HttpResponseOptionsBuilder

Non-generic builder used for Result (no value).

HttpResponseOptionsBuilder<TDomain>

Fluent options builder for ToHttpResponse<T>(Result<T>, Action<HttpResponseOptionsBuilder<T>>?). Selectors run against the TDomain value (not the projected response body).

IfNoneMatchExtensions

Extension methods for If-None-Match validation on unsafe methods (create-if-absent patterns).

PageLink

A cursor + the absolute URL the client should follow to fetch the linked page.

PagedResponse<TResponse>

JSON envelope wrapping a single page of items and its cursor links.

PartialContentHttpResult

A Minimal API IResult that returns HTTP 206 Partial Content with a Content-Range header. Used to indicate that the response contains a subset of the requested resource.

PartialContentResult

Represents an ObjectResult that returns HTTP 206 Partial Content with a Content-Range header. Used to indicate that the response contains a subset of the requested resource.

PreferHeader

Parses the RFC 7240 Prefer request header and exposes standard preference tokens.

RangeOutcome

Result of evaluating a Range request per RFC 9110 §14.

RangeOutcome.FullRepresentation

No Range header or range not applicable — serve full representation.

RangeOutcome.NotSatisfiable

Range not satisfiable (416).

RangeOutcome.PartialContent

Range satisfiable — serve partial content (206).

RangeRequestEvaluator

Evaluates RFC 9110 §14 Range request headers. Only supports byte ranges. Non-GET requests are treated as Full (Range ignored).

RuleViolationProblemDetail

JSON shape used for rule violations in ProblemDetails extensions.

ScalarValueValidationEndpointFilter

An endpoint filter that checks for scalar value validation errors collected during JSON deserialization. For Minimal APIs, this filter returns validation problem results when validation errors are detected.

ScalarValueValidationFilter

An action filter that checks for validation errors collected during JSON deserialization and validates IScalarValue<TSelf, TPrimitive> route/query parameters. Returns a 400 Bad Request response with validation problem details when validation fails.

ScalarValueValidationMiddleware

Middleware that creates a validation error collection scope for each request. This enables ValidatingJsonConverter to collect validation errors across the entire request deserialization process.

ServiceCollectionExtensions

Extension methods for configuring automatic value object validation in ASP.NET Core.

TrellisAspOptions

Configuration options for Trellis ASP.NET Core integration. Controls how domain error types are mapped to HTTP status codes.

ValidationErrorsContext

Provides a context for collecting validation errors during JSON deserialization. Uses AsyncLocal to maintain thread-safe, request-scoped error collection.

Interfaces

IRepresentationValidator<T>

Strategy for generating representation-specific validators (ETags) that account for content negotiation variants per RFC 9110 §8.8.3.1/§8.8.3.3.