From a7a8e6b7da784fc9197cd94a294057cec91df1bc Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Wed, 7 Feb 2024 13:37:17 -0800 Subject: [PATCH] Fix some discovered issues (#3050) --- src/cfnlint/data/schemas/other/resources/configuration.json | 4 +--- src/cfnlint/decode/mark.py | 1 + src/cfnlint/jsonschema/_filter.py | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/cfnlint/data/schemas/other/resources/configuration.json b/src/cfnlint/data/schemas/other/resources/configuration.json index 3c9293de36..80de098efb 100644 --- a/src/cfnlint/data/schemas/other/resources/configuration.json +++ b/src/cfnlint/data/schemas/other/resources/configuration.json @@ -100,9 +100,7 @@ "Metadata": { "$ref": "#/definitions/Metadata" }, - "Properties": { - "awsType": "CfnResourceProperties" - }, + "Properties": {}, "Type": { "type": "string" }, diff --git a/src/cfnlint/decode/mark.py b/src/cfnlint/decode/mark.py index 5c42cb8ce4..ec71038518 100644 --- a/src/cfnlint/decode/mark.py +++ b/src/cfnlint/decode/mark.py @@ -2,6 +2,7 @@ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ + from dataclasses import dataclass diff --git a/src/cfnlint/jsonschema/_filter.py b/src/cfnlint/jsonschema/_filter.py index a7cf91add9..2f5c9633d9 100644 --- a/src/cfnlint/jsonschema/_filter.py +++ b/src/cfnlint/jsonschema/_filter.py @@ -66,9 +66,9 @@ def _filter_schemas(self, schema, validator: Any) -> Tuple[Any, Any]: # Adding these items to the schema # will allow us to continue to check the nested elements if "cfnLint" not in standard_schema: - if ( - "object" in ensure_list(standard_schema.get("type", [])) - and "properties" not in standard_schema + if "object" in ensure_list(standard_schema.get("type", [])) and not any( + p not in standard_schema + for p in ["properties", "additionalProperties", "patternProperties"] ): standard_schema["patternProperties"] = { ".*": {"type": _all_types},