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

Fix oneof schema #72

Closed vladtsir closed 4 years ago

vladtsir commented 4 years ago

Issue #, if available:

70

Description of changes:

Looking at how ResourceTypeSchema is used, I'm rather convinced that it should not subclass from ObjectSchema (or Schema) at all. Its primary use is to provide strongly-typed access to schema elements; this can be done if the schema is contained within. Currently nothing uses ResourceTypeSchema to validate actual CFN templates, but if necessary, this can be easily done by forwarding "validate" call to the schema member

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

shares history with #69 . merge that first, and then rebase this or open a new PR. closing so nobody reviews and you are free to rewrite the git history of the PR.