aws-cloudformation / cloudformation-resource-schema

The CloudFormation Resource Schema defines the shape and semantic for resources provisioned by CloudFormation. It is used by provider developers using the CloudFormation RPDK.
Apache License 2.0
95 stars 38 forks source link

Validate ref #69

Closed vladtsir closed 4 years ago

vladtsir commented 4 years ago

Issue #, if available:

23

Description of changes:

Everit validates $ref values, when a Schema is created using SchemaLoader$load().

This change adds loading resource definition as a schema with ResourceDefinitionSchema and JSON schema registered as meta-schemas. Unit tests show that invalid references cause SchemaLoader to throw a ValidationException.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

tobywf commented 4 years ago

this shares history with #68 - need to get that merged first. i've already closed #72 , because three dependent PRs is definitely too much. if you want to leave this one open for review, you'll have to get #68 merged first, and then merge master into this PR. do not rebase if people have already reviewed, it breaks links between comments and code because history is rewritten on rebase.

edit: fixed