Improve properties schema to support mutually exclusive properties
There are cases where a resource has some properties that are mutually exclusive and at least one of them is required (like SIZE and BACKUP_ID of the AWS::EC2::Volume). Currently they can not be marked as required, and the resource has to implement a custom validate logic to check for validity of the provide properties combination.
Here it is proposed to add a "conflicts" field to property schema accepting a list of other properties that are mutually exclusive with given one. Properties' validation should then check that one and only one of the conflicting properties is provided. That will allow to properly mark exclusive properties as required. Docs generation must also be updated to use and describe the new field.
Blueprint information
- Status:
- Not started
- Approver:
- Zane Bitter
- Priority:
- Low
- Drafter:
- Pavlo Shchelokovskyy
- Direction:
- Approved
- Assignee:
- None
- Definition:
- Review
- Series goal:
- None
- Implementation:
- Not started
- Milestone target:
- next
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Support mutually exclusive properties in schema
Gerrit topic: https:/
Work Items
Work items:
Add schema elements and respective validation: INPROGRESS
Update docs generation: TODO
Switch all respective usages to new schema: TODO