From 9ce56a247fca2f95a08ee87b697de53bf214b417 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 17 Oct 2025 14:19:09 +0100 Subject: [PATCH] Make schema for `QueryFilter` less strict --- lib/init-action.js | 3 ++- src/config/db-config.test.ts | 19 +++++++++++++++++++ src/db-config-schema.json | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/init-action.js b/lib/init-action.js index 26e28786e..479b166ee 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -35375,7 +35375,8 @@ var require_db_config_schema = __commonJS({ }, { $ref: "#/definitions/IncludeQueryFilter" - } + }, + {} ] }, ExcludeQueryFilter: { diff --git a/src/config/db-config.test.ts b/src/config/db-config.test.ts index 7f2d642f4..d7ff48eed 100644 --- a/src/config/db-config.test.ts +++ b/src/config/db-config.test.ts @@ -442,6 +442,25 @@ test("parseUserConfig - throws a ConfigurationError if the file is not valid YAM ); }); +test("parseUserConfig - validation isn't picky about `query-filters`", (t) => { + const loggedMessages: LoggedMessage[] = []; + const logger = getRecordingLogger(loggedMessages); + + t.notThrows(() => + dbConfig.parseUserConfig( + logger, + "test", + ` + query-filters: + - something + - include: foo + - exclude: bar + `, + true, + ), + ); +}); + test("parseUserConfig - throws a ConfigurationError if validation fails", (t) => { const loggedMessages: LoggedMessage[] = []; const logger = getRecordingLogger(loggedMessages); diff --git a/src/db-config-schema.json b/src/db-config-schema.json index 84aba8f8a..9cede94ae 100644 --- a/src/db-config-schema.json +++ b/src/db-config-schema.json @@ -87,7 +87,8 @@ }, { "$ref": "#/definitions/IncludeQueryFilter" - } + }, + {} ] }, "ExcludeQueryFilter": {