Add API metadata route #51

Merged
erik merged 1 commit from feat/task-47be19ea-api-meta-route into main 2026-05-22 11:26:34 -05:00
Owner

Summary

  • Add GET /api/v1/meta with site, API, and software bootstrap metadata.
  • Build API URLs from the request origin and /api/v1 base path.
  • Use configured site identity from siteConfig.
  • Add OpenAPI meta.get path and MetaResponse schema.
  • Add route tests and document the metadata URL.

Testing

  • make check
  • ./scripts/pre-pr.sh
  • Manual smoke: run the template site on a temporary port and curl /api/v1/meta.

Task: #task-47be19ea

## Summary - Add `GET /api/v1/meta` with site, API, and software bootstrap metadata. - Build API URLs from the request origin and `/api/v1` base path. - Use configured site identity from `siteConfig`. - Add OpenAPI `meta.get` path and `MetaResponse` schema. - Add route tests and document the metadata URL. ## Testing - `make check` - `./scripts/pre-pr.sh` - Manual smoke: run the template site on a temporary port and curl `/api/v1/meta`. Task: #task-47be19ea
feat: add API metadata route
All checks were successful
CI / build-lint-test (pull_request) Successful in 28s
5d42adf9b2
Task: #task-47be19ea
Author
Owner

PR Review: Approved

Summary

Reviewed PR #51 at commit 5d42adf. The PR adds the API metadata route as a small bootstrap slice: GET /api/v1/meta returns site, API, and software metadata; base/openapi URLs are derived from the request origin; site identity comes from siteConfig; the route is documented in OpenAPI as meta.get; and tests cover the response shape plus absence of an ad hoc capability matrix.

Acceptance Criteria

  • Metadata route returns 200 with the documented JSON shape.
  • Response includes API version and OpenAPI URL.
  • Response does not include an ad hoc feature matrix.
  • Route appears in OpenAPI with the operation ID from the spec.
  • Tests cover the response shape.
  • Relevant lint/test checks pass: make check, ./scripts/pre-pr.sh, manual /api/v1/meta smoke, and Forgejo CI all passed.

Blocking Issues

None.

Warnings

None.

Verdict

Approved for merge.

## PR Review: Approved ### Summary Reviewed PR #51 at commit `5d42adf`. The PR adds the API metadata route as a small bootstrap slice: `GET /api/v1/meta` returns site, API, and software metadata; base/openapi URLs are derived from the request origin; site identity comes from `siteConfig`; the route is documented in OpenAPI as `meta.get`; and tests cover the response shape plus absence of an ad hoc capability matrix. ### Acceptance Criteria - [x] Metadata route returns `200` with the documented JSON shape. - [x] Response includes API version and OpenAPI URL. - [x] Response does not include an ad hoc feature matrix. - [x] Route appears in OpenAPI with the operation ID from the spec. - [x] Tests cover the response shape. - [x] Relevant lint/test checks pass: `make check`, `./scripts/pre-pr.sh`, manual `/api/v1/meta` smoke, and Forgejo CI all passed. ### Blocking Issues None. ### Warnings None. ### Verdict Approved for merge.
erik merged commit 53fe78293c into main 2026-05-22 11:26:34 -05:00
Sign in to join this conversation.
No description provided.