From 1c2f2bb0b7353264320b95f8f7c336ea74acafaf Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Mon, 11 Oct 2021 19:36:33 +0530 Subject: [PATCH] chore(cfnspec): improve messaging when property type cannot be determined. The error message is inaccurate and results in a message like - ``` AWS::Foo::Bar.Properties.Baz has known type: {"Documentation":"...","Required":false,"UpdateType":"Immutable"} ``` Improve the message. --- packages/@aws-cdk/cfnspec/test/spec-validators.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/cfnspec/test/spec-validators.ts b/packages/@aws-cdk/cfnspec/test/spec-validators.ts index 408febb3e1b50..0c49c6bfa1a03 100644 --- a/packages/@aws-cdk/cfnspec/test/spec-validators.ts +++ b/packages/@aws-cdk/cfnspec/test/spec-validators.ts @@ -110,7 +110,8 @@ function validateProperties( } else { // eslint-disable-next-line no-console - console.error(`${typeName}.Properties.${name} has known type: ${JSON.stringify(property)}`); + console.error(`${typeName}.Properties.${name} does not declare a type.` + + `Property definition is: ${JSON.stringify(property, undefined, 2)}`); expect(false).toBeTruthy(); }