You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix cfn-mutability for inherited identifiers (#1465)
* Fix cfn-mutability for inherited identifiers
For resources with parent resources, identifiers that are inherited
should be marked with create-and-read mutability instead of the
defaults for that resource. This fixes that case, and adjusts the
test cases to verify the correct behavior
Copy file name to clipboardExpand all lines: smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceIndex.java
Copy file name to clipboardExpand all lines: smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceProperty.java
+4-1
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,10 @@ public ShapeId getShapeId() {
66
66
* by the use of a trait instead of derived through its lifecycle
67
67
* bindings within a resource.
68
68
*
69
-
* @return Returns true if the mutability is explicitly defined by a trait.
69
+
* <p> Also returns true for identifiers, since their mutability is inherent
70
+
*
71
+
* @return Returns true if the mutability is explicitly defined by a trait or
Copy file name to clipboardExpand all lines: smithy-aws-cloudformation-traits/src/test/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceIndexTest.java
+3-3
Original file line number
Diff line number
Diff line change
@@ -99,15 +99,15 @@ public static Collection<ResourceData> data() {
Copy file name to clipboardExpand all lines: smithy-aws-cloudformation/src/test/resources/software/amazon/smithy/aws/cloudformation/schema/fromsmithy/smithy-testservice-basil.cfn.json
0 commit comments