headscale/cmd
Kristoffer Dalby c9bbb5bdec api/v1: add code-first Huma implementation of the v1 API
Reimplement the v1 API as a code-first Huma service in hscontrol/api/v1,
a thin adapter over the state layer. Huma emits the OpenAPI 3.1 document
(openapi/v1/headscale.yaml) from the Go operation and type definitions;
cmd/gen-openapi writes it and the 3.0.3 downgrade the client is generated
from. Responses reproduce the protojson wire contract (string-encoded
64-bit IDs, all fields emitted, RFC3339/null timestamps); errors map to
the correct HTTP status (404/400/409, 500 for server faults) via mapError.

Serve it on the chi router at /api/v1 behind the existing API-key
middleware, and point /swagger at the emitted spec.
2026-06-19 15:21:00 +02:00
..
dev cmd/dev: validate --port fits the derived-port range 2026-04-17 16:31:49 +01:00
gen-openapi api/v1: add code-first Huma implementation of the v1 API 2026-06-19 15:21:00 +02:00
headscale all: adopt strings, errors, and os helpers 2026-06-17 16:12:19 +02:00
hi all: adopt strings, errors, and os helpers 2026-06-17 16:12:19 +02:00
mapresponses all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
vendorhash all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00