Property Def. 'required' attribute should default to True
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TOSCA Parser |
New
|
Undecided
|
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:
3.5.8.5 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) |