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

Resource definition validator #3

Closed johnttompkins closed 5 years ago

johnttompkins commented 5 years ago

Issue #, if available:

Description of changes: This PR creates a validator class that can be used to specifically validate resource definitions against the provider definition schema. This saves others using the library the trouble of loading the schema in, as the DefinitionValidator loads the schema upon construction.

The first commit in this PR also removes the property $id from the provider definition schema, as this is a reserved keyword in JSON schema and causes issues with the Everit validator library.

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