Monorepo for Tangled
tangled.org
1{
2 "lexicon": 1,
3 "id": "sh.tangled.label.definition",
4 "needsCbor": true,
5 "needsType": true,
6 "defs": {
7 "main": {
8 "type": "record",
9 "key": "any",
10 "record": {
11 "type": "object",
12 "required": [
13 "name",
14 "valueType",
15 "scope",
16 "createdAt"
17 ],
18 "properties": {
19 "name": {
20 "type": "string",
21 "description": "The display name of this label.",
22 "minGraphemes": 1,
23 "maxGraphemes": 40
24 },
25 "valueType": {
26 "type": "ref",
27 "ref": "#valueType",
28 "description": "The type definition of this label. Appviews may allow sorting for certain types."
29 },
30 "scope": {
31 "type": "array",
32 "description": "The areas of the repo this label may apply to, eg.: sh.tangled.repo.issue. Appviews may choose to respect this.",
33 "items": {
34 "type": "string",
35 "format": "nsid"
36 }
37 },
38 "color": {
39 "type": "string",
40 "description": "The hex value for the background color for the label. Appviews may choose to respect this."
41 },
42 "createdAt": {
43 "type": "string",
44 "format": "datetime"
45 },
46 "multiple": {
47 "type": "boolean",
48 "description": "Whether this label can be repeated for a given entity, eg.: [reviewer:foo, reviewer:bar]"
49 }
50 }
51 }
52 },
53 "valueType": {
54 "type": "object",
55 "required": [
56 "type",
57 "format"
58 ],
59 "properties": {
60 "type": {
61 "type": "string",
62 "enum": [
63 "null",
64 "boolean",
65 "integer",
66 "string"
67 ],
68 "description": "The concrete type of this label's value."
69 },
70 "format": {
71 "type": "string",
72 "enum": [
73 "any",
74 "did",
75 "nsid"
76 ],
77 "description": "An optional constraint that can be applied on string concrete types."
78 },
79 "enum": {
80 "type": "array",
81 "description": "Closed set of values that this label can take.",
82 "items": {
83 "type": "string"
84 }
85 }
86 }
87 }
88 }
89}