-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom vocabulary: keywords useful for arrays of objects #28
Comments
Semantics:
Since both keywords can act on object items even when the property is not present, and the outcome is indeterminant if the property types vary, it is recommended to include extra validation with the "required", "properties" and "type" keywords for the property of interest. Example:
|
TBD: maybe both these keywords could also take a list of properties?
|
For better flexibility I would consider using jsonpath expressions. The Example above then would become something like
whilst allowing for conjunction keys etc.
That would also allow for lists:
|
see json-schema-org/json-schema-vocabularies#22 -- when the instance data is an array of objects, it would be useful to have the keywords
isUniqueByProperty: <propertyname>
andisSortedByProperty: <propertyname>
.The text was updated successfully, but these errors were encountered: