cloudformation-resource-schema
cloudformation-resource-schema copied to clipboard
Validate examples of properties in schema according to schema
From https://github.com/aws-cloudformation/aws-cloudformation-rpdk/issues/68
At the moment, examples fields aren't validated. The result is invalid examples, e.g. this ARN (rouge dot at the end):
"Arn": {
"type": "string",
"pattern": "^arn:aws(-(cn|gov))?:[a-z-]+:(([a-z]+-)+[0-9])?:([0-9]{12})?:[^.]+$"
"examples": [
"arn:aws:sqs:us-east-2:123456789012:mystack-myqueue-15PG5C2FC1CW8."
]
},
It's a shame JSON schema doesn't do this, but we can add this.
It's a shame JSON schema doesn't do this
Agreed. This should probably be upstreamed if we get around to fixing this