Add API metadata route #30

Closed
opened 2026-05-19 19:51:45 -05:00 by erik · 2 comments
Owner

Goal

Implement the Slugkit API metadata route so clients can discover API version, implementation identity, and OpenAPI location.

Spec: docs/specs/01-meta-route.md

Requirements

  • Implement the metadata route under /api/v1 exactly as documented in the spec.
  • Include API version, implementation identity, software/version information when available, and OpenAPI document URL.
  • Keep metadata focused on bootstrap information; do not add a parallel capability matrix.
  • Ensure the slug CLI can use the response before attempting authenticated operations.
  • Document the route in OpenAPI with the correct operation ID and response schema.
  • Add tests for response shape and OpenAPI coverage.

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.

Dependencies

  • task-c272cbda
  • task-0dbd25d3
## Goal Implement the Slugkit API metadata route so clients can discover API version, implementation identity, and OpenAPI location. Spec: `docs/specs/01-meta-route.md` ## Requirements - Implement the metadata route under `/api/v1` exactly as documented in the spec. - Include API version, implementation identity, software/version information when available, and OpenAPI document URL. - Keep metadata focused on bootstrap information; do not add a parallel capability matrix. - Ensure the `slug` CLI can use the response before attempting authenticated operations. - Document the route in OpenAPI with the correct operation ID and response schema. - Add tests for response shape and OpenAPI coverage. ## 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. ## Dependencies - task-c272cbda - task-0dbd25d3
Author
Owner

Synced from todu comment by @todu on 2026-05-22T16:15:12.424Z

PR Review: Approved

PR: #51

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.

_Synced from todu comment by @todu on 2026-05-22T16:15:12.424Z_ ## PR Review: Approved PR: https://forge.caradoc.com/erik/slugkit/pulls/51 ### 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 2026-05-22 11:32:37 -05:00
Author
Owner

Synced from todu comment by @todu on 2026-05-22T16:27:46.141Z

Closing Summary

PR #51 merged: #51

Acceptance criteria evidence:

  • Metadata route returns 200 with the documented JSON shape: met — GET /api/v1/meta returns site, API, and software objects.
  • Response includes API version and OpenAPI URL: met — response includes api.version and request-origin-derived api.openapiUrl.
  • Response does not include an ad hoc feature matrix: met — tests assert no capabilities property.
  • Route appears in OpenAPI with the operation ID from the spec: met — /meta is documented with operationId: "meta.get".
  • Tests cover the response shape: met — route tests verify exact metadata response.
  • Relevant lint/test checks pass: met — make check, ./scripts/pre-pr.sh, PR CI, and main push CI passed.

Readiness: READY

_Synced from todu comment by @todu on 2026-05-22T16:27:46.141Z_ ## Closing Summary PR #51 merged: https://forge.caradoc.com/erik/slugkit/pulls/51 Acceptance criteria evidence: - Metadata route returns `200` with the documented JSON shape: met — `GET /api/v1/meta` returns site, API, and software objects. - Response includes API version and OpenAPI URL: met — response includes `api.version` and request-origin-derived `api.openapiUrl`. - Response does not include an ad hoc feature matrix: met — tests assert no `capabilities` property. - Route appears in OpenAPI with the operation ID from the spec: met — `/meta` is documented with `operationId: "meta.get"`. - Tests cover the response shape: met — route tests verify exact metadata response. - Relevant lint/test checks pass: met — `make check`, `./scripts/pre-pr.sh`, PR CI, and main push CI passed. Readiness: READY
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#30
No description provided.