rdm-schema icon indicating copy to clipboard operation
rdm-schema copied to clipboard

Ensure the subdevice range properties require their parent

Open peternewman opened this issue 5 years ago • 2 comments

Even if they're optional, when they are used they should require what they are ranging

peternewman avatar Sep 13 '20 00:09 peternewman

If someone wants to write a schema with "get_request_subdevice_range" and "set_request_subdevice_range", but without corresponding "get_request" and "set_request", that's up to them. These are fields that effectively annotate "get_request" and "set_request", so their presence shouldn't require them. They will do nothing. It's not the schema's job to detect badly-formed schema instances. That's a job for a linter tool.

ssilverman avatar Sep 22 '20 18:09 ssilverman

Another way of putting it: My principle here is that annotations shouldn't require the thing they're annotating, at least in the schema validation level.

ssilverman avatar Sep 22 '20 18:09 ssilverman