A better Rust ATProto crate
1{
2 "lexicon": 1,
3 "id": "pub.leaflet.poll.definition",
4 "defs": {
5 "main": {
6 "type": "record",
7 "description": "Poll definition record",
8 "key": "tid",
9 "record": {
10 "type": "object",
11 "required": ["question", "options"],
12 "properties": {
13 "question": {
14 "type": "string",
15 "maxLength": 300
16 },
17 "options": {
18 "type": "array",
19 "items": {
20 "type": "ref",
21 "ref": "#option"
22 },
23 "minLength": 2,
24 "maxLength": 4
25 },
26 "endsAt": {
27 "type": "string",
28 "format": "datetime"
29 }
30 }
31 }
32 },
33 "option": {
34 "type": "object",
35 "required": ["text"],
36 "properties": {
37 "text": {
38 "type": "string",
39 "maxLength": 100
40 }
41 }
42 },
43 "vote": {
44 "type": "object",
45 "required": ["pollRef", "optionIndex"],
46 "properties": {
47 "pollRef": {
48 "type": "ref",
49 "ref": "com.atproto.repo.strongRef"
50 },
51 "optionIndex": {
52 "type": "integer",
53 "minimum": 0
54 }
55 }
56 }
57 }
58}