{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "FileNodeComparator.schema.json", "title": "FileNodeComparator", "description": "A Comparator of `FileNode/query` (RFC 8620 ยง5.5). Nodes without a value sort last either way; ties by name, then id.", "type": "object", "properties": { "property": { "anyOf": [ { "enum": [ "name", "type", "size", "created", "modified", "nodeType", "tree", "photoTaken", "similarity", "field" ], "description": "draft-ietf-jmap-filenode-14's sort options, and this API's: `photoTaken` (when taken, a picture not read yet by when modified), `similarity` (with `similarTo` only, most similar first), `field` (a source's `sortable` field)." }, { "type": "string", "description": "Any other FileNode property, ordered by its value as FileNode/get answers it." } ] }, "isAscending": { "type": "boolean", "default": true }, "collation": { "type": "string" }, "source": { "description": "With `field`: the source.", "$ref": "Common.schema.json#/$defs/SourceId" }, "name": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9]{0,63}$", "description": "With `field`: the field." } }, "required": ["property"], "anyOf": [ { "properties": { "property": { "not": { "const": "field" } } } }, { "required": ["source", "name"] } ] }