Skip to content

Commit

Permalink
Add uniqueKeys validation to jsonschema validation (#2992)
Browse files Browse the repository at this point in the history
* Add uniqueKeys validation to jsonschema validation
  • Loading branch information
kddejong committed Apr 25, 2024
1 parent b0def45 commit 7269383
Show file tree
Hide file tree
Showing 301 changed files with 24,780 additions and 26,485 deletions.
9 changes: 9 additions & 0 deletions scripts/update_schemas_manually.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,15 @@ def make_only_one_required(props: Sequence[str]) -> Sequence[Dict[str, Any]]:
),
],
),
ResourcePatch(
resource_type="AWS::ECS::TaskDefinition",
patches=[
Patch(
path="/definitions/ContainerDefinition/properties/Environment",
values={"uniqueKeys": ["Name"]},
),
],
),
ResourcePatch(
resource_type="AWS::ElastiCache::ReplicationGroup",
patches=[
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"433e97e79195923f7df34afd9d140bfc\"", "url": "https://schema.cloudformation.eu-south-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"66932265fe8c24cb91c0d352a9c3c837\"", "url": "https://schema.cloudformation.eu-south-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"b9a2627f7ddd44c485a06b9a32744c91\"", "url": "https://schema.cloudformation.cn-north-1.amazonaws.com.cn/CloudformationSchema.zip"}
{"etag": "\"4cecebeb0d06650598b30fccdb81f29c\"", "url": "https://schema.cloudformation.cn-north-1.amazonaws.com.cn/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"2942b5da1f38dbc7f021f3aa250eeeef\"", "url": "https://schema.cloudformation.us-gov-east-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"c8f49e54175af91d3d70c07a602147b2\"", "url": "https://schema.cloudformation.us-gov-east-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"e66593754e392c10b5ca50bbf9c25aa2\"", "url": "https://schema.cloudformation.me-south-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"5b46fca5855db08176ba755678cab655\"", "url": "https://schema.cloudformation.me-south-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"1a55ecd468419d09a728c9527ee933da\"", "url": "https://schema.cloudformation.us-gov-west-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"a3a85189c0e56e187547553774c8b6c1\"", "url": "https://schema.cloudformation.us-gov-west-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"ea98f11b7d83b5197e654f92a1bb2ca0\"", "url": "https://schema.cloudformation.me-central-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"4e867075f99a1feeb4631771a1878adf\"", "url": "https://schema.cloudformation.me-central-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"c46c95c7ed44602bfc9295244bb24555\"", "url": "https://schema.cloudformation.eu-west-2.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"b2c55eed5766d99836913a9e3e8bbaca\"", "url": "https://schema.cloudformation.eu-west-2.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"99f1d850cb322cf375814482f4f62f38\"", "url": "https://schema.cloudformation.cn-northwest-1.amazonaws.com.cn/CloudformationSchema.zip"}
{"etag": "\"815ce375a5384a16110081d2541d68ee\"", "url": "https://schema.cloudformation.cn-northwest-1.amazonaws.com.cn/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"b0fbf4b86f09444c3a8fe57f300bc6af\"", "url": "https://schema.cloudformation.af-south-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"1e09347f67d55d9cda6f4a9543a4283e\"", "url": "https://schema.cloudformation.af-south-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"619d19b0cc09edb05b9c78e7470cd3c4\"", "url": "https://schema.cloudformation.us-west-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"a5ae1c4fdad8b72698b09c31c959b2a7\"", "url": "https://schema.cloudformation.us-west-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"3865d796bbf0653f3d356fbb6ca0e4bc\"", "url": "https://schema.cloudformation.eu-central-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"8e3cb665aa787fa7a4693e0a474eb329\"", "url": "https://schema.cloudformation.eu-central-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"93ca2d5239f934b51b0a30e7c637bd86\"", "url": "https://schema.cloudformation.ap-south-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"51b0136f04fdc749b6170623ebb91578\"", "url": "https://schema.cloudformation.ap-south-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"865284161d6ab61d3aa5df18bae86afc\"", "url": "https://schema.cloudformation.ap-southeast-4.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"149d351a8cd344ea2ed4ea92c0ae734a\"", "url": "https://schema.cloudformation.ap-southeast-4.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"e6ef271bc0f5429aa319f61f9b8a0111\"", "url": "https://schema.cloudformation.us-east-2.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"f25e6b1d28bc644de640f0a6ca42fcd0\"", "url": "https://schema.cloudformation.us-east-2.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"20f7e6acd7723aec8a4f2af86d82858f\"", "url": "https://schema.cloudformation.ap-southeast-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"4b06a16bc371f24a79a7210136013803\"", "url": "https://schema.cloudformation.ap-southeast-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"fd20c93eb0211bd7233d54c026fd5617\"", "url": "https://schema.cloudformation.ap-northeast-2.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"5b95f032a08846d04db4cde9cdac8df2\"", "url": "https://schema.cloudformation.ap-northeast-2.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"c0806d3c00e893b6104f56cb79587153\"", "url": "https://schema.cloudformation.ap-southeast-3.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"cd3269faa77477ecd4f6acd18221861b\"", "url": "https://schema.cloudformation.ap-southeast-3.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"f26c6037b2473531063d3ea58d3f405d\"", "url": "https://schema.cloudformation.ap-east-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"9f42bbd84830777c1201d55f77333dd6\"", "url": "https://schema.cloudformation.ap-east-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"379744668ec008c28bd03bdf98dcabaf\"", "url": "https://schema.cloudformation.sa-east-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"2c97541e956ebdcf8af9f366bdeb2202\"", "url": "https://schema.cloudformation.sa-east-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"17d17126355ab60c8aabcc77f5062019\"", "url": "https://schema.cloudformation.ap-southeast-2.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"928885374163431b0dfa128bdbe6730e\"", "url": "https://schema.cloudformation.ap-southeast-2.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"a7e186e7106e69c36bcba50677d5ad32\"", "url": "https://schema.cloudformation.ca-west-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"0d7ebb22e0d56301f755b16f5db66502\"", "url": "https://schema.cloudformation.ca-west-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"2e1645e99ebe0be7f57d3cc9168b3d0e\"", "url": "https://schema.cloudformation.eu-central-2.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"883b97cfab6cca641d6cc3d3e3db4ad9\"", "url": "https://schema.cloudformation.eu-central-2.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"780be88cb1cd73d126f3ebe2395a7d98\"", "url": "https://schema.cloudformation.eu-north-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"b43cabddec8176c483b054b9d13cb3bd\"", "url": "https://schema.cloudformation.eu-north-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"696b659fef341334c7fecfed9e89ff6b\"", "url": "https://schema.cloudformation.eu-south-2.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"77058e707802b746e3ff172c6f5a19cb\"", "url": "https://schema.cloudformation.eu-south-2.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"88ade1a08daf8d9df3255807a3dd3e53\"", "url": "https://schema.cloudformation.ca-central-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"934b78453b9a10998bd35f9dc1318352\"", "url": "https://schema.cloudformation.ca-central-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"57a7b254335710ea944e488d2e5896bb\"", "url": "https://schema.cloudformation.eu-west-3.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"cb37a4afc1110172564ce3663cbaedf2\"", "url": "https://schema.cloudformation.eu-west-3.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"717e70cac2abd9d623693d1e36fee94d\"", "url": "https://schema.cloudformation.ap-northeast-3.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"98ee7147d74493f1d92dc4b24b33c90c\"", "url": "https://schema.cloudformation.ap-northeast-3.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"77cc727b4ce058de3f06ccf616457e59\"", "url": "https://schema.cloudformation.us-west-2.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"d800ab1f3e2c4d858d8e282a9b2e480f\"", "url": "https://schema.cloudformation.us-west-2.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"6931546dec4a9931516941cc3a7b31d0\"", "url": "https://schema.cloudformation.ap-south-2.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"b875db8f4a201a7d06ca9cec0d97969e\"", "url": "https://schema.cloudformation.ap-south-2.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"16bd7ecdde6801014ac6d5d0db40e721\"", "url": "https://schema.cloudformation.us-east-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"2ff166c341ce18cba864af14510cb1e4\"", "url": "https://schema.cloudformation.us-east-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"18aaa39acdc89354df689e82f416c3b4\"", "url": "https://schema.cloudformation.eu-west-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"f6440c635d2804b02f0f90683cf81d62\"", "url": "https://schema.cloudformation.eu-west-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"etag": "\"148c59fcb4a0d50021475f79ca0882c7\"", "url": "https://schema.cloudformation.ap-northeast-1.amazonaws.com/CloudformationSchema.zip"}
{"etag": "\"ff8d98e14e6d9eea9aa0b30d98f70b78\"", "url": "https://schema.cloudformation.ap-northeast-1.amazonaws.com/CloudformationSchema.zip"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"op": "add",
"path": "/definitions/ContainerDefinition/properties/Environment/uniqueKeys",
"value": [
"Name"
]
}
]
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"op": "test",
"path": "/definitions/ApiKeyRestrictions/properties/AllowReferers/items/pattern",
"value": "^([$\\-._+!*\\x{60}(),;/?:@=&\\w]|%([0-9a-fA-F?]{2}|[0-9a-fA-F?]?[*]))+$"
},
{
"op": "replace",
"path": "/definitions/ApiKeyRestrictions/properties/AllowReferers/items/pattern",
"value": "^([$\\-._+!*`(),;/?:@=&\\w]|%([0-9a-fA-F?]{2}|[0-9a-fA-F?]?[*]))+$"
}
]
10 changes: 8 additions & 2 deletions src/cfnlint/data/schemas/providers/af_south_1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
"AWS::VoiceID::Domain",
"AWS::ApiGateway::Authorizer",
"AWS::BackupGateway::Hypervisor",
"AWS::Connect::PredefinedAttribute",
"AWS::IAM::Policy",
"AWS::DataBrew::Schedule",
"AWS::Connect::ApprovedOrigin",
Expand All @@ -281,6 +282,7 @@
"AWS::EC2::TransitGatewayMulticastGroupMember",
"AWS::EC2::VolumeAttachment",
"AWS::Glue::SecurityConfiguration",
"AWS::NetworkFirewall::TLSInspectionConfiguration",
"AWS::DataBrew::Ruleset",
"AWS::ApplicationInsights::Application",
"AWS::ECS::ClusterCapacityProviderAssociations",
Expand Down Expand Up @@ -934,6 +936,7 @@
"aws-xray-resourcepolicy.json",
"aws-servicecatalog-launchtemplateconstraint.json",
"aws-wafv2-loggingconfiguration.json",
"aws-dynamodb-globaltable.json",
"aws-backup-backupplan.json",
"aws-imagebuilder-distributionconfiguration.json",
"aws-lakeformation-permissions.json",
Expand Down Expand Up @@ -979,6 +982,7 @@
"aws-voiceid-domain.json",
"aws-apigateway-authorizer.json",
"aws-backupgateway-hypervisor.json",
"aws-connect-predefinedattribute.json",
"aws-iam-policy.json",
"aws-databrew-schedule.json",
"aws-connect-approvedorigin.json",
Expand All @@ -989,6 +993,7 @@
"aws-ec2-transitgatewaymulticastgroupmember.json",
"aws-ec2-volumeattachment.json",
"aws-glue-securityconfiguration.json",
"aws-networkfirewall-tlsinspectionconfiguration.json",
"aws-databrew-ruleset.json",
"aws-applicationinsights-application.json",
"aws-ecs-clustercapacityproviderassociations.json",
Expand Down Expand Up @@ -1063,6 +1068,7 @@
"aws-connect-contactflowmodule.json",
"aws-codedeploy-deploymentconfig.json",
"aws-networkmanager-globalnetwork.json",
"aws-connect-tasktemplate.json",
"aws-stepfunctions-statemachineversion.json",
"aws-servicecatalogappregistry-application.json",
"aws-networkmanager-site.json",
Expand Down Expand Up @@ -1108,18 +1114,17 @@
"aws-appsync-domainnameapiassociation.json",
"aws-apigateway-account.json",
"aws-wafv2-webacl.json",
"aws-globalaccelerator-endpointgroup.json",
"aws-ec2-transitgatewayconnect.json",
"aws-networkmanager-sitetositevpnattachment.json",
"aws-ec2-securitygroup.json",
"aws-opsworks-volume.json",
"aws-ses-emailidentity.json",
"aws-iam-usertogroupaddition.json",
"aws-events-rule.json",
"aws-cloudfront-keyvaluestore.json",
"aws-databrew-dataset.json",
"aws-ec2-vpngatewayroutepropagation.json",
"aws-glue-crawler.json",
"aws-cloudfront-function.json",
"aws-apigateway-method.json",
"aws-wafregional-regexpatternset.json",
"aws-ssm-patchbaseline.json",
Expand Down Expand Up @@ -1218,6 +1223,7 @@
"aws-cloudfront-originaccesscontrol.json",
"aws-secretsmanager-rotationschedule.json",
"aws-lambda-permission.json",
"aws-networkfirewall-firewallpolicy.json",
"aws-eks-identityproviderconfig.json",
"aws-ec2-ipamresourcediscoveryassociation.json",
"aws-servicecatalogappregistry-attributegroup.json",
Expand Down
Loading

0 comments on commit 7269383

Please sign in to comment.