Property Def. 'required' attribute should default to True

Bug #1544783 reported by Matt Rutkowski
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
Matt Rutkowski

Bug Description

According to the TOSCA v1.0 spec., any property definition which does not have a 'required' attribute explicitly listed, would be treated as if it had one with a value True.

The actual spec. wording is here: Additional Requirements
• A property SHALL be considered required by default (i.e., as if the required keyname on the definition is set to true) unless the definition’s required keyname is explicitly set to false.

This applies to anywhere a Property Def. would appear, for example a Node Type, Capability Type or even a complex Data Type.

This will require some adjustments to existing Tox tests, as well as the logic which now throws exception in in various "validate" methods that check for required

In addition, if a "required" property does NOT have a "value" set, that is OK, as long as a "default" value is provided in the schema. Since these validation checks are tied together, this bug will be used to fix both checks as it hits the same lines of code.

Matt is already working on this.

Changed in tosca-parser:
assignee: nobody → Matt Rutkowski (mrutkows)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.