vikunja/pkg/routes/api/v1/humaapi
kolaente 898ca26627 fix(spike): mount Huma under /oas3 and translate Vikunja errors
Three follow-ups to Task E2 needed to make the routes functional end to end:

- Echo v5 panics on duplicate (method, path) registrations, so the
  Huma-backed label routes live under /api/v1/oas3/labels for the spike.
  The legacy /api/v1/labels endpoints remain unchanged.
- Huma's built-in /openapi.{json,yaml,docs} routes are disabled. The spec
  is re-exposed via a handler on the unauth group so clients and tooling
  can fetch it without a bearer token, matching the /docs.json treatment.
- Errors returned from the shared handler.Do* pipeline (echo.HTTPError,
  web.HTTPErrorProcessor) are translated into Vikunja-shaped
  huma.StatusErrors, preserving the legacy {code, message} body contract
  instead of Huma's default "unexpected error occurred" wrap.

Also sets humaConfig.FieldsOptionalByDefault=true so PUT/POST bodies
don't need to include derived fields like created/updated/created_by.
2026-04-20 11:05:36 +02:00
..
crud.go fix(spike): mount Huma under /oas3 and translate Vikunja errors 2026-04-20 11:05:36 +02:00
crud_test.go feat(huma): generic CRUD registrar for CObject resources 2026-04-20 10:56:33 +02:00
errors.go fix(spike): mount Huma under /oas3 and translate Vikunja errors 2026-04-20 11:05:36 +02:00
errors_test.go feat(huma): error formatter matching legacy Vikunja JSON shape 2026-04-20 10:43:42 +02:00
labels.go feat(spike): register Label via Huma alongside legacy routes 2026-04-20 10:57:35 +02:00