Contract Coverage
--check verifies that every [RivetContract] field is actually implemented, and that the implementation matches the declaration:
dotnet rivet --project path/to/Api.csproj --checkThe checker finds .Success(...), .Error(...), and .File(...) terminal calls for each contract field, including terminals reached through .Bind(input), in controller actions, minimal API handlers (MapGet/MapPost/MapPut/ MapDelete/MapPatch lambdas), and isolated Azure Functions using [Function], [HttpTrigger], and .ToActionResult(). Functions coverage reads the project's host.json HTTP prefix (default api) and honors the host environment override. See Azure Functions for conventions and a real-host test. It reports four kinds of warning on stderr:
| Warning | Meaning |
|---|---|
MissingImplementation | No contract response terminal found for the contract field. |
OrphanedBinding | The contract was bound in a route handler, but no terminal result from that binding is returned. |
HttpMethodMismatch | The implementing endpoint uses a different HTTP method than the contract declares. |
RouteMismatch | The implementing endpoint's route does not match the contract's route template. |
A summary line is always printed:
Coverage: 6/6 endpoints covered. All OK.Exit code
When --check is used, any warning makes the command exit with code 1 — suitable for CI, both with and without --output: coverage runs before emission, so a failed check prints the warnings and writes nothing even when an output directory is requested. Combine with -q/--quiet to suppress generation output in CI logs.
