From d4fe12fba7a6b06f02ee2a15274b2446e1d6a8cd Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 31 Oct 2023 12:19:18 +0100 Subject: [PATCH] Survive incorrect deprecatedProperties --- .../src/importers/import-cloudformation-registry.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/service-spec-importers/src/importers/import-cloudformation-registry.ts b/packages/@aws-cdk/service-spec-importers/src/importers/import-cloudformation-registry.ts index 715ecefdf..c141ffc7c 100644 --- a/packages/@aws-cdk/service-spec-importers/src/importers/import-cloudformation-registry.ts +++ b/packages/@aws-cdk/service-spec-importers/src/importers/import-cloudformation-registry.ts @@ -41,7 +41,11 @@ export function importCloudFormationRegistryResource(options: LoadCloudFormation recurseProperties(resource, resourceBuilder, resourceFailure); - resourceBuilder.markDeprecatedProperties(...(resource.deprecatedProperties ?? []).map(simplePropNameFromJsonPtr)); + // AWS::CloudFront::ContinuousDeploymentPolicy recently introduced a change where they're marking deprecatedProperties + // as `/definitions//properties/` instead of `/properties///`. Ignore those, as it's + // out-of-spec + const deprecatedProperties = (resource.deprecatedProperties ?? []).filter((p) => p.startsWith('/properties/')); + resourceBuilder.markDeprecatedProperties(...deprecatedProperties); // Mark everything 'readOnlyProperties` as attributes. However, in the old spec it is possible // that properties and attributes have the same names, with different types. If that happens (by