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
93 stars 38 forks source link

Adds a model for the resource schema #12

Closed rjlohan closed 5 years ago

rjlohan commented 5 years ago

Description of changes: ResourceTypeSchema introduced to express simple modelling of the extended meta schema properties we have. This type extends the ObjectSchema in the everit-org/json-schema package and converts the unprocessed schema fields (those extensions which are not part of draft-07) into modelled properties. Would prefer to use a consistent Builder pattern but some of the types are internal and not easily extended. What I have here is simpler anyway, and achieves the result.

A Parser shim on top of the model converts types like JSONPointer into String for simpler parsing. Not strictly necessary but might be helpful.

Extended the test schema to allow tests to verify all the extended property modelling.

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