diff --git a/scripts/fixSchemas.ts b/scripts/fixSchemas.ts index da24819b00..27d680677c 100644 --- a/scripts/fixSchemas.ts +++ b/scripts/fixSchemas.ts @@ -227,6 +227,13 @@ function extractHintsFrom( ". Remember that you should use {'if': 'value=[actual_value]', 'then': '[some explanation]'}" ) } + if (!hintElement.if || !hintElement.then) { + throw ( + "A suggestion generated an object missing either `if` or `then` " + + path.join(".") + + ". Remember that you should use {'if': 'value=[actual_value]', 'then': '[some explanation]'}" + ) + } } }