Skip to content

Commit a3e9c99

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

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
@@ -2485,10 +2485,12 @@ function buildContentControlSchemas(): Record<ContentControlOperationId, Operati
24852485
// ---------------------------------------------------------------------------
24862486

24872487
// --- Shared patterns ---
2488-
const refListQuerySchema = objectSchema({
2488+
const refListQueryProperties = {
24892489
limit: { type: 'integer', minimum: 1 },
24902490
offset: { type: 'integer', minimum: 0 },
2491-
});
2491+
} satisfies Record<string, JsonSchema>;
2492+
2493+
const refListQuerySchema = objectSchema(refListQueryProperties);
24922494

24932495
const discoveryOutputSchema: JsonSchema = { type: 'object' };
24942496

@@ -6689,7 +6691,7 @@ const operationSchemas: Record<OperationId, OperationSchemaSet> = {
66896691
// -------------------------------------------------------------------------
66906692
'bookmarks.list': {
66916693
input: objectSchema({
6692-
...((refListQuerySchema.properties as Record<string, JsonSchema>) ?? {}),
6694+
...refListQueryProperties,
66936695
in: storyLocatorSchema,
66946696
}),
66956697
output: discoveryOutputSchema,

0 commit comments

Comments
 (0)