Skip to content

Commit 0443332

Browse files
fix(document-api): replace fragile schema spread with shared property reference in bookmarks.list
1 parent e941e60 commit 0443332

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/document-api/src/contract/schemas.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,10 +2496,12 @@ function buildContentControlSchemas(): Record<ContentControlOperationId, Operati
24962496
// ---------------------------------------------------------------------------
24972497

24982498
// --- Shared patterns ---
2499-
const refListQuerySchema = objectSchema({
2499+
const refListQueryProperties = {
25002500
limit: { type: 'integer', minimum: 1 },
25012501
offset: { type: 'integer', minimum: 0 },
2502-
});
2502+
} satisfies Record<string, JsonSchema>;
2503+
2504+
const refListQuerySchema = objectSchema(refListQueryProperties);
25032505

25042506
const discoveryOutputSchema: JsonSchema = { type: 'object' };
25052507

@@ -6706,7 +6708,7 @@ const operationSchemas: Record<OperationId, OperationSchemaSet> = {
67066708
// -------------------------------------------------------------------------
67076709
'bookmarks.list': {
67086710
input: objectSchema({
6709-
...((refListQuerySchema.properties as Record<string, JsonSchema>) ?? {}),
6711+
...refListQueryProperties,
67106712
in: storyLocatorSchema,
67116713
}),
67126714
output: discoveryOutputSchema,

0 commit comments

Comments
 (0)