diff --git a/src/services/n8n-validation.ts b/src/services/n8n-validation.ts index f0aa22e..f52beb3 100644 --- a/src/services/n8n-validation.ts +++ b/src/services/n8n-validation.ts @@ -103,7 +103,8 @@ export function cleanWorkflowForCreate(workflow: Partial): Partial { // // PROBLEM: // - Some versions reject updates with settings properties (community forum reports) - // - Cloud versions REQUIRE settings property to be present (n8n.estyl.team) // - Properties like callerPolicy cause "additional properties" errors + // - Empty settings objects {} cause "additional properties" validation errors (Issue #431) // // SOLUTION: // - Filter settings to only include whitelisted properties (OpenAPI spec) - // - If no settings provided, use empty object {} for safety - // - Empty object satisfies "required property" validation (cloud API) + // - If no settings after filtering, omit the property entirely (n8n API rejects empty objects) + // - Omitting the property prevents "additional properties" validation errors // - Whitelisted properties prevent "additional properties" errors // // References: + // - Issue #431: Empty settings validation error // - https://community.n8n.io/t/api-workflow-update-endpoint-doesnt-support-setting-callerpolicy/161916 // - OpenAPI spec: workflowSettings schema // - Tested on n8n.estyl.team (cloud) and localhost (self-hosted)