Skip to content

Commit 12af728

Browse files
committed
docs(spec): the maintenance switch's describe names the record-currency backfill door
`metadata.endpoints.maintenance` now also mounts `POST /meta/_migrate-record-currency-codes`, and each endpoints switch's describe() enumerates every mount it gates. The reference page is regenerated from the schema. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cyrhYJgbkZHbbqud3F
1 parent b56a12d commit 12af728

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎.changeset/30675-record-currency-backfill-rest-door.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
'@objectstack/objectql': patch
55
'@objectstack/cli': patch
66
'@objectstack/metadata-protocol': patch
7+
'@objectstack/spec': patch
78
---
89

910
feat(rest, client): a tenant-admin REST door for the record-currency code backfill

‎content/docs/references/api/rest-server.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const result = BatchEndpointsConfigSchema.parse(data);
225225
| **types** | `boolean` | optional (default: `true`) | Mount the metadata type list — `GET /meta` and `GET /meta/types` (one handler, two paths) |
226226
| **items** | `boolean` | optional (default: `true`) | Mount the per-type item list — `GET /meta/:type`, and nothing else |
227227
| **item** | `boolean` | optional (default: `true`) | Mount the whole per-item face — `GET`, `PUT` and `DELETE /meta/:type/:name`, its `/references` and `/layers` reads, the history family (`GET` `/history`, `/audit`, `/diff`, `/published`; `POST` `/publish`, `/rollback`), `GET /meta/book/:name/tree` and the app metadata bundle `GET /meta/app/:appId/bundle`, which registers through the same per-item registrar because every member it serves is the item read's own answer |
228-
| **maintenance** | `boolean` | optional (default: `true`) | Mount the whole-store maintenance operations — `GET /meta/diagnostics`, `GET /meta/_drafts` and the `POST /meta/_migrate-stored` write door |
228+
| **maintenance** | `boolean` | optional (default: `true`) | Mount the whole-store maintenance operations — `GET /meta/diagnostics`, `GET /meta/_drafts`, the `POST /meta/_migrate-stored` write door and the `POST /meta/_migrate-record-currency-codes` record-currency code backfill |
229229
| **schema** | `never` | optional | [REMOVED] `metadata.endpoints.schema` was removed in @objectstack/spec 17 (ADR-0049 enforce-or-remove) — it gated a route that does not exist: the REST server mounts no `GET /meta/:type/:name/schema`, so `false` removed nothing and `true` added nothing. Delete the key; `endpoints.types` / `items` / `item` / `maintenance` are the switches that gate real mounts. |
230230

231231

‎packages/spec/src/api/rest-server.zod.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,8 @@ export const MetadataEndpointsConfigSchema = lazySchema(() => z.object({
538538
maintenance: z.boolean().default(true)
539539
.describe(
540540
'Mount the whole-store maintenance operations — `GET /meta/diagnostics`, '
541-
+ '`GET /meta/_drafts` and the `POST /meta/_migrate-stored` write door',
541+
+ '`GET /meta/_drafts`, the `POST /meta/_migrate-stored` write door and the '
542+
+ '`POST /meta/_migrate-record-currency-codes` record-currency code backfill',
542543
),
543544
/**
544545
* [REMOVED in commit b3a63d32c] Gated a route that does not exist: the REST server

0 commit comments

Comments
 (0)