Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions functions/check-standard-for-error-payload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading