-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allowed Nested reference for TagProperty (#152)
- Loading branch information
Showing
6 changed files
with
226 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/test/resources/invalid-with-tagging-bad-pointer-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"typeName": "AWS::Test::TestModel", | ||
"description": "A test schema for unit tests.", | ||
"properties": { | ||
"propertyA": { | ||
"type": "boolean" | ||
}, | ||
"propertyB": { | ||
"description": "A list of tags to apply to the resource.", | ||
"type": "array", | ||
"uniqueItems": true, | ||
"arrayType": "Standard", | ||
"insertionOrder": false | ||
} | ||
}, | ||
"primaryIdentifier": [ | ||
"/properties/propertyA" | ||
], | ||
"replacementStrategy": "delete_then_create", | ||
"tagging": { | ||
"taggable": true, | ||
"tagOnCreate": true, | ||
"tagUpdatable": false, | ||
"cloudFormationSystemTags": false, | ||
"tagProperty": "propertyB", | ||
"permissions": [ | ||
"test:permission" | ||
] | ||
}, | ||
"additionalProperties": false | ||
} |
31 changes: 31 additions & 0 deletions
31
src/test/resources/invalid-with-tagging-bad-reference-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"typeName": "AWS::Test::TestModel", | ||
"description": "A test schema for unit tests.", | ||
"properties": { | ||
"propertyA": { | ||
"type": "boolean" | ||
}, | ||
"propertyB": { | ||
"description": "A list of tags to apply to the resource.", | ||
"type": "array", | ||
"uniqueItems": true, | ||
"arrayType": "Standard", | ||
"insertionOrder": false | ||
} | ||
}, | ||
"primaryIdentifier": [ | ||
"/properties/propertyA" | ||
], | ||
"replacementStrategy": "delete_then_create", | ||
"tagging": { | ||
"taggable": true, | ||
"tagOnCreate": true, | ||
"tagUpdatable": false, | ||
"cloudFormationSystemTags": false, | ||
"tagProperty": "/propertyB", | ||
"permissions": [ | ||
"test:permission" | ||
] | ||
}, | ||
"additionalProperties": false | ||
} |
46 changes: 46 additions & 0 deletions
46
src/test/resources/valid-with-tagging-missing-tagProperty-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"typeName": "AWS::Test::TestModel", | ||
"description": "A test schema for unit tests.", | ||
"definitions": { | ||
"Tag": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"Key": { | ||
"description": "The key name of the tag", | ||
"type": "string" | ||
}, | ||
"Value": { | ||
"description": "The value for the tag", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"Value", | ||
"Key" | ||
] | ||
} | ||
}, | ||
"properties": { | ||
"propertyA": { | ||
"type": "boolean" | ||
}, | ||
"Tags": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/Tag" | ||
} | ||
} | ||
}, | ||
"primaryIdentifier": [ | ||
"/properties/propertyA" | ||
], | ||
"replacementStrategy": "delete_then_create", | ||
"tagging": { | ||
"taggable": true, | ||
"tagOnCreate": true, | ||
"tagUpdatable": false, | ||
"cloudFormationSystemTags": false | ||
}, | ||
"additionalProperties": false | ||
} |
61 changes: 61 additions & 0 deletions
61
src/test/resources/valid-with-tagging-nested-property-schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"typeName": "AWS::Test::TestModel", | ||
"description": "A test schema for unit tests.", | ||
"definitions": { | ||
"propertyC": { | ||
"type": "object", | ||
"properties": { | ||
"Tags": { | ||
"description": "An array of arbitrary tags (key-value pairs) to associate with the stage.", | ||
"type": "array", | ||
"uniqueItems": false, | ||
"insertionOrder": false, | ||
"items": { | ||
"$ref": "#/definitions/Tag" | ||
} | ||
} | ||
} | ||
}, | ||
"Tag": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"Key": { | ||
"description": "The key name of the tag", | ||
"type": "string" | ||
}, | ||
"Value": { | ||
"description": "The value for the tag", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"Value", | ||
"Key" | ||
] | ||
} | ||
}, | ||
"properties": { | ||
"propertyA": { | ||
"type": "boolean" | ||
}, | ||
"propertyC": { | ||
"$ref": "#/definitions/propertyC" | ||
} | ||
}, | ||
"primaryIdentifier": [ | ||
"/properties/propertyA" | ||
], | ||
"replacementStrategy": "delete_then_create", | ||
"tagging": { | ||
"taggable": true, | ||
"tagOnCreate": true, | ||
"tagUpdatable": false, | ||
"cloudFormationSystemTags": false, | ||
"tagProperty": "/properties/propertyC/Tags", | ||
"permissions": [ | ||
"test:permission" | ||
] | ||
}, | ||
"additionalProperties": false | ||
} |