Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate examples of properties in schema according to schema #22

Open
tobywf opened this issue Jul 8, 2019 · 1 comment
Open

Validate examples of properties in schema according to schema #22

tobywf opened this issue Jul 8, 2019 · 1 comment

Comments

@tobywf
Copy link
Contributor

tobywf commented Jul 8, 2019

From aws-cloudformation/cloudformation-cli#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.

@PatMyron
Copy link
Contributor

It's a shame JSON schema doesn't do this

Agreed. This should probably be upstreamed if we get around to fixing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants