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

Attempt to enforce "additionalProperties" to false #49

Closed tobywf closed 4 years ago

tobywf commented 4 years ago

Issue #, if available: #33

Description of changes: Require additionalProperties for objects. This does work, but also causes $ref to require "additionalProperties": false, as definitions without a type are implicitly object. Since we are not resolving refs as a language feature, but validating it as is, they implicitly default to it (#23). Hence, draft.

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

MattMCloudy commented 4 years ago

I'm a little confused on what issue this is resolving? Based on the description additionalProperties was already enforced to be false. Was it trying to validate too much?

tobywf commented 4 years ago

Sorry, updated the description to make it clearer. As we discussed on #34 , currently for objects "additionalProperties": false is enforced but not required all the way throughout the tree.

MattMCloudy commented 4 years ago

I see so this change enforces additionalProperties == false throughout the schema.