Add runtime site config editing #63

Merged
erik merged 1 commit from feat/task-fbb9f988-runtime-site-config-editing into main 2026-05-22 17:58:47 -05:00
Owner

Summary

Add runtime site config editing through the Slugkit API, OpenAPI document, and slug CLI.

Task

Task: #task-fbb9f988

Changes

  • Add authenticated GET /api/v1/site-config and PATCH /api/v1/site-config routes.
  • Validate supported site config updates and return standard validation/auth errors.
  • Update OpenAPI and API design docs for site config read/update operations.
  • Add slug site config show and slug site config set <field> <value> commands that call the API.
  • Add API and CLI tests for successful reads/updates and invalid input.

Testing

  • Unit tests added/updated
  • Manual testing performed: make dev, local migrated DB/API key, slug site config set tagline "CLI Smoke Tagline" --json, and GET /api/v1/meta reflected DB-backed config.
  • make check passes
  • ./scripts/pre-pr.sh passes

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated (if needed)
  • No unrelated changes included
## Summary Add runtime site config editing through the Slugkit API, OpenAPI document, and `slug` CLI. ## Task Task: #task-fbb9f988 ## Changes - Add authenticated `GET /api/v1/site-config` and `PATCH /api/v1/site-config` routes. - Validate supported site config updates and return standard validation/auth errors. - Update OpenAPI and API design docs for site config read/update operations. - Add `slug site config show` and `slug site config set <field> <value>` commands that call the API. - Add API and CLI tests for successful reads/updates and invalid input. ## Testing - [x] Unit tests added/updated - [x] Manual testing performed: `make dev`, local migrated DB/API key, `slug site config set tagline "CLI Smoke Tagline" --json`, and `GET /api/v1/meta` reflected DB-backed config. - [x] `make check` passes - [x] `./scripts/pre-pr.sh` passes ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated (if needed) - [x] No unrelated changes included
feat: add runtime site config editing
All checks were successful
CI / build-lint-test (pull_request) Successful in 29s
9cc7461c49
Task: #task-fbb9f988
Author
Owner

PR Review: Approved

Summary

Reviewed PR #63 at commit 9cc7461. The PR delivers the runtime site config editing slice through the product path: authenticated API routes, OpenAPI contract, CLI commands using the API, tests, and docs. Manual smoke and CI are reported green.

Acceptance Criteria

  • A site owner can read supported site config through the Slugkit API: met — GET /api/v1/site-config returns the supported site identity/homepage config fields behind bearer auth.
  • A site owner can update a supported config value through the Slugkit API: met — PATCH /api/v1/site-config validates and persists partial updates via updateSiteConfig.
  • The OpenAPI document includes the site config read/update operations: met — /site-config includes siteConfig.get and siteConfig.update, plus request/response schemas.
  • A site owner can read and update supported config through the slug CLI: met — slug site config show and slug site config set <field> <value> use the configured API client.
  • Updated config is visible through the public/manual test path: met — API tests assert updated config is reflected on / and /api/v1/meta; manual smoke verified CLI update and metadata reflection.
  • Invalid config input returns clear API and CLI errors: met — API returns field-level validation errors; CLI propagates API validation messages.
  • Tests cover successful API/CLI update and invalid input: met — new API route tests and CLI command tests cover read/update and validation paths.
  • Relevant lint/test checks pass: met — make check, ./scripts/pre-pr.sh, and Forgejo CI passed.

Blocking Issues

None.

Warnings

None.

Verdict

Approved for merge after explicit human approval.

## PR Review: Approved ### Summary Reviewed PR #63 at commit `9cc7461`. The PR delivers the runtime site config editing slice through the product path: authenticated API routes, OpenAPI contract, CLI commands using the API, tests, and docs. Manual smoke and CI are reported green. ### Acceptance Criteria - [x] A site owner can read supported site config through the Slugkit API: met — `GET /api/v1/site-config` returns the supported site identity/homepage config fields behind bearer auth. - [x] A site owner can update a supported config value through the Slugkit API: met — `PATCH /api/v1/site-config` validates and persists partial updates via `updateSiteConfig`. - [x] The OpenAPI document includes the site config read/update operations: met — `/site-config` includes `siteConfig.get` and `siteConfig.update`, plus request/response schemas. - [x] A site owner can read and update supported config through the `slug` CLI: met — `slug site config show` and `slug site config set <field> <value>` use the configured API client. - [x] Updated config is visible through the public/manual test path: met — API tests assert updated config is reflected on `/` and `/api/v1/meta`; manual smoke verified CLI update and metadata reflection. - [x] Invalid config input returns clear API and CLI errors: met — API returns field-level validation errors; CLI propagates API validation messages. - [x] Tests cover successful API/CLI update and invalid input: met — new API route tests and CLI command tests cover read/update and validation paths. - [x] Relevant lint/test checks pass: met — `make check`, `./scripts/pre-pr.sh`, and Forgejo CI passed. ### Blocking Issues None. ### Warnings None. ### Verdict Approved for merge after explicit human approval.
erik merged commit 38018c550d into main 2026-05-22 17:58:47 -05:00
erik deleted branch feat/task-fbb9f988-runtime-site-config-editing 2026-05-22 17:58:47 -05:00
Sign in to join this conversation.
No description provided.