You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't a serious feature request at this point, but it occurred to me that this was something that JSON Schema is incapable of expressing, so I'm creating an issue to document the deficiency. I've never heard of anyone needing this feature, so it's probably better for someone to write a vocab for if they need it.
These keywords would work exactly like contains, but only apply to "additional items" as determined by additionalItems or unevaluatedItems.
Proposal
Add keyword additionalItemsContains that works exactly like contains, but only applies to "additional items" as determined by the additionalItems keyword.
Add keyword additionalItemsMaxContains that works exactly like maxContains, but only applies to "additional items" as determined by the additionalItems keyword.
Add keyword additionalItemsMinContains that works exactly like minContains, but only applies to "additional items" as determined by the additionalItems keyword.
Add keyword unevaluatedItemsContains that works exactly like contains, but only applies to "additional items" as determined by the unevaluatedItems keyword.
Add keyword unevaluatedItemsMaxContains that works exactly like maxContains, but only applies to "additional items" as determined by the unevaluatedItems keyword.
Add keyword unevaluatedItemsMinContains that works exactly like minContains, but only applies to "additional items" as determined by the unevaluatedItems keyword.
Pros
Givens JSON Schema the ability to describe something it can't currently do.
Cons
That's a lot of keywords to add for a feature that no one has ever asked for.
The text was updated successfully, but these errors were encountered:
That's a lot of keywords to add for a feature that no one has ever asked for.
🤣
I'm going to go ahead and move this over to our vocabularies repo- we're doing that with most new keyword proposals now (although we haven't finished moving the ones that were filed in the past).
handrews
transferred this issue from json-schema-org/json-schema-spec
Feb 28, 2020
This isn't a serious feature request at this point, but it occurred to me that this was something that JSON Schema is incapable of expressing, so I'm creating an issue to document the deficiency. I've never heard of anyone needing this feature, so it's probably better for someone to write a vocab for if they need it.
These keywords would work exactly like
contains
, but only apply to "additional items" as determined byadditionalItems
orunevaluatedItems
.Proposal
additionalItemsContains
that works exactly likecontains
, but only applies to "additional items" as determined by theadditionalItems
keyword.additionalItemsMaxContains
that works exactly likemaxContains
, but only applies to "additional items" as determined by theadditionalItems
keyword.additionalItemsMinContains
that works exactly likeminContains
, but only applies to "additional items" as determined by theadditionalItems
keyword.unevaluatedItemsContains
that works exactly likecontains
, but only applies to "additional items" as determined by theunevaluatedItems
keyword.unevaluatedItemsMaxContains
that works exactly likemaxContains
, but only applies to "additional items" as determined by theunevaluatedItems
keyword.unevaluatedItemsMinContains
that works exactly likeminContains
, but only applies to "additional items" as determined by theunevaluatedItems
keyword.Pros
Cons
The text was updated successfully, but these errors were encountered: