{
"lexicon": 1,
"id": "pub.leaflet.comment",
"description": "A lexicon for comments on documents",
"defs": {
"main": {
"type": "record",
"key": "tid",
"description": "Record containing a comment",
"record": {
"type": "object",
"required": [
"subject",
"plaintext",
"createdAt"
],
"properties": {
"subject": {
"type": "string",
"format": "at-uri"
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"reply": {
"type": "ref",
"ref": "#replyRef"
},
"plaintext": {
"type": "string"
},
"facets": {
"type": "array",
"items": {
"type": "ref",
"ref": "pub.leaflet.richtext.facet"
}
},
"attachment": {
"type": "union",
"refs": [
"#linearDocumentQuote"
]
}
}
}
},
"linearDocumentQuote": {
"type": "object",
"required": [
"document",
"quote"
],
"properties": {
"document": {
"type": "string",
"format": "at-uri"
},
"quote": {
"type": "ref",
"ref": "pub.leaflet.pages.linearDocument#quote"
}
}
},
"replyRef": {
"type": "object",
"required": [
"parent"
],
"properties": {
"parent": {
"type": "string",
"format": "at-uri"
}
}
}
}
}