The CloudFormation Resource Schema defines the shape and semantic for resources provisioned by CloudFormation. It is used by provider developers using the CloudFormation RPDK.
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.
Issue #, if available:
70
Description of changes:
Looking at how
ResourceTypeSchema
is used, I'm rather convinced that it should not subclass fromObjectSchema
(orSchema
) 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 theschema
memberBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.