-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
catch common resource schema issues (#663)
resource types with LIST API options like MaxResults, NextToken, Filters, etc as properties of the resource itself: aws-cloudformation/aws-cloudformation-resource-providers-licensemanager#3 aws-cloudformation/aws-cloudformation-resource-providers-iotwireless#3 aws-cloudformation/aws-cloudformation-resource-providers-ssm#75 readOnlyProperties overlapping with writeOnlyProperties or createOnlyProperties: aws-cloudformation/aws-cloudformation-resource-providers-auditmanager#2 aws-cloudformation/aws-cloudformation-resource-providers-codeartifact#38 no wildcards in handler permissions: aws-cloudformation/aws-cloudformation-resource-providers-greengrassv2#4 aws-cloudformation/aws-cloudformation-resource-providers-imagebuilder@55fa9bf#r46035310
- Loading branch information
Showing
6 changed files
with
93 additions
and
16 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,4 @@ good-names=e,ex,f,fp,i,j,k,n,_ | |
[FORMAT] | ||
|
||
indent-string=' ' | ||
max-line-length=88 | ||
max-line-length=160 |
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
14 changes: 14 additions & 0 deletions
14
tests/data/schema/valid/invalid_list_api_options_as_properties.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,14 @@ | ||
{ | ||
"typeName" : "AWS::Service::Type", | ||
"description" : "", | ||
"additionalProperties" : false, | ||
"properties" : { | ||
"NextToken" : { | ||
"type" : "string" | ||
} | ||
}, | ||
"readOnlyProperties": [ | ||
"/properties/NextToken" | ||
], | ||
"primaryIdentifier" : [ "/properties/NextToken" ] | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/data/schema/valid/invalid_readOnlyProperties_overlap.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,17 @@ | ||
{ | ||
"typeName" : "AWS::Service::Type", | ||
"description" : "", | ||
"additionalProperties" : false, | ||
"properties" : { | ||
"Property" : { | ||
"type" : "string" | ||
} | ||
}, | ||
"readOnlyProperties": [ | ||
"/properties/Property" | ||
], | ||
"createOnlyProperties": [ | ||
"/properties/Property" | ||
], | ||
"primaryIdentifier" : [ "/properties/Property" ] | ||
} |
21 changes: 21 additions & 0 deletions
21
tests/data/schema/valid/invalid_wildcard_handler_permissions.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,21 @@ | ||
{ | ||
"typeName" : "AWS::Service::Type", | ||
"description" : "", | ||
"additionalProperties" : false, | ||
"properties" : { | ||
"Property" : { | ||
"type" : "string" | ||
} | ||
}, | ||
"readOnlyProperties": [ | ||
"/properties/Property" | ||
], | ||
"primaryIdentifier" : [ "/properties/Property" ], | ||
"handlers": { | ||
"create": { | ||
"permissions": [ | ||
"service:create*" | ||
] | ||
} | ||
} | ||
} |