Now let's take a silly one
1{
2 "lexicon": 1,
3 "id": "sh.tangled.git.refUpdate",
4 "defs": {
5 "main": {
6 "type": "record",
7 "description": "An update to a git repository, emitted by knots.",
8 "key": "tid",
9 "record": {
10 "type": "object",
11 "required": [
12 "ref",
13 "committerDid",
14 "repo",
15 "oldSha",
16 "newSha",
17 "meta"
18 ],
19 "properties": {
20 "ref": {
21 "type": "string",
22 "description": "Ref being updated",
23 "maxGraphemes": 256,
24 "maxLength": 2560
25 },
26 "committerDid": {
27 "type": "string",
28 "description": "did of the user that pushed this ref",
29 "format": "did"
30 },
31 "ownerDid": {
32 "type": "string",
33 "description": "did of the owner of the repo",
34 "format": "did"
35 },
36 "repo": {
37 "type": "string",
38 "description": "DID of the repo itself",
39 "format": "did"
40 },
41 "oldSha": {
42 "type": "string",
43 "description": "old SHA of this ref",
44 "minLength": 40,
45 "maxLength": 40
46 },
47 "newSha": {
48 "type": "string",
49 "description": "new SHA of this ref",
50 "minLength": 40,
51 "maxLength": 40
52 },
53 "meta": {
54 "type": "ref",
55 "ref": "#meta"
56 }
57 }
58 }
59 },
60 "meta": {
61 "type": "object",
62 "required": ["isDefaultRef", "commitCount"],
63 "properties": {
64 "isDefaultRef": {
65 "type": "boolean",
66 "default": false
67 },
68 "langBreakdown": {
69 "type": "ref",
70 "ref": "#langBreakdown"
71 },
72 "commitCount": {
73 "type": "ref",
74 "ref": "#commitCountBreakdown"
75 }
76 }
77 },
78 "langBreakdown": {
79 "type": "object",
80 "properties": {
81 "inputs": {
82 "type": "array",
83 "items": {
84 "type": "ref",
85 "ref": "#individualLanguageSize"
86 }
87 }
88 }
89 },
90 "individualLanguageSize": {
91 "type": "object",
92 "required": ["lang", "size"],
93 "properties": {
94 "lang": {
95 "type": "string"
96 },
97 "size": {
98 "type": "integer"
99 }
100 }
101 },
102 "commitCountBreakdown": {
103 "type": "object",
104 "required": [],
105 "properties": {
106 "byEmail": {
107 "type": "array",
108 "items": {
109 "type": "ref",
110 "ref": "#individualEmailCommitCount"
111 }
112 }
113 }
114 },
115 "individualEmailCommitCount": {
116 "type": "object",
117 "required": ["email", "count"],
118 "properties": {
119 "email": {
120 "type": "string"
121 },
122 "count": {
123 "type": "integer"
124 }
125 }
126 }
127 }
128}