From 782716bd8391e80b81e020ce22a35d016e465462 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 30 Mar 2026 21:55:32 +0000 Subject: [PATCH] fix: place spread before explicit metadata in buildJsonSchemaDocument Move ...jsonSchema spread to come before the explicit $schema, title, and description properties so that schema annotations can never silently override the values passed via options. --- scripts/lib/json-schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/json-schema.ts b/scripts/lib/json-schema.ts index 53fa5408ac..a0d4b7f622 100644 --- a/scripts/lib/json-schema.ts +++ b/scripts/lib/json-schema.ts @@ -22,10 +22,10 @@ export function buildJsonSchemaDocument( } return { + ...jsonSchema, $schema: JSON_SCHEMA_DRAFT_2020_12, title: options.title, description: options.description, - ...jsonSchema, }; }