Description
During yesterday's meeting, I brought up that in the time since we decided to allow "contains"
to apply to objects, we've shifted to more of an emphasis on stability.
"contains"
was added in draft-06, and while the details of its interactions with "minContains"
and "maxContains"
(added in 2019-09) have changed, its assertion behavior on its own has not. Allowing these three keywords to apply to objects is a breaking change.
We could instead revert them to apply only to arrays and introduce keywords named something like "containsPropertyValue"
, "minContainsPropertyValue"
, "maxContainsPropertyValue"
alongside them. I'll let others sort out the ideal names. "containsProperty"
might be fine but also feels a bit like it is talking about property names rather than values. Another option could be "hasValue"
or "hasPropertyValue"
or something of that sort. All of the name options are less aesthetically appealing than having "contains"
work on objects, but they'd preserve more stability.
I don't have an incredibly strong opinion on this, but it seemed to get some traction in the call so I thought I'd file it.
Metadata
Metadata
Assignees
Type
Projects
Status