From 912b0f3231f0298d4798bed7caf31eeace2af6fe Mon Sep 17 00:00:00 2001 From: Johannes de Beer Date: Tue, 18 Nov 2025 09:35:59 -0800 Subject: [PATCH] TM-185013 - fix linting issues When the error response schema uses a oneOf to point to other schema objects the validator would fail because it expected a single object only. This now prevents that failure - most noticeably on the missing "properties" keyword --- functions/check-standard-for-error-payload.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions/check-standard-for-error-payload.js b/functions/check-standard-for-error-payload.js index b6ca371..22a82d5 100644 --- a/functions/check-standard-for-error-payload.js +++ b/functions/check-standard-for-error-payload.js @@ -51,6 +51,13 @@ module.exports = (input) => { }, ]; } + + // If the schema uses oneOf to reference other error shapes, skip deep validation + // and do not require local properties. This preserves existing behavior for + // direct object definitions while allowing composed schemas. + if (schema && Array.isArray(schema.oneOf) && schema.oneOf.length > 0) { + return undefined; + } // Check if properties exist if (!schema.properties) {