← ClaudeAtlas

hex-restapi-endpointlisted

Use when adding or changing one REST route, or creating a resource's router file `restapi/routers/<resource>.py` — thin routes over application handlers, a route that carries a file, dishka handler injection, route ordering, and which error codes the route advertises. Owns the per-operation code sets and advertise-only-what-you-produce. The pydantic models are `hex-restapi-schema`; the auth dependency and the `401` / `403` that follow it are `hex-restapi-auth`.
wntic/pyhouse · ★ 3 · API & Backend · score 76
Install: claude install-skill wntic/pyhouse
# Hex — REST API Endpoint Produces one HTTP endpoint for one resource. Routers grow incrementally — this skill adds one route at a time. A "router file" exists once per resource; subsequent endpoint additions extend it. **Read the sibling `CONTRACTS.md` in this skill's own directory before choosing what a route advertises in `responses=error_responses(...)`.** It carries the per-operation code sets and the helper the decorator draws on; only `SKILL.md` is loaded automatically. ## When to use vs. neighbours - One new endpoint or modification of an existing one, including one that carries a file → this skill. - Pydantic request/response schemas this route maps to and from → `hex-restapi-schema`. - The `responses=error_responses(...)` declaration and which codes belong in it → this skill, in the sibling `CONTRACTS.md`. - Defining a new error class, and boundary translation → `exception-catalog`; the status it answers with → `hex-restapi-app`'s `STATUS_BY_ERROR`, needed only where it differs from its parent's. - Attaching an auth dependency to a route, and the `401` / `403` that follow it → `hex-restapi-auth`. - The shell this router registers into — `restapi/main.py`, its middleware, and the registry for a status a middleware introduces → `hex-restapi-app`. - The composition root that binds the handler this route injects → `hex-wiring`. - Testing this route through the real app → `hex-test-restapi-endpoint`; the OpenAPI and app-construction properties discovered across all r