Repository navigation
Expand file tree
/
Copy pathcodebase-notes.schema.json
More file actions
55 lines (55 loc) · 1.56 KB
/
Copy pathcodebase-notes.schema.json
File metadata and controls
55 lines (55 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Codebase Notes",
"description": "Editor-neutral notes. Version 3 supports slash-compacted directory paths.",
"type": "object",
"required": ["version", "notes"],
"properties": {
"$schema": { "type": "string", "format": "uri-reference" },
"version": { "type": "integer", "const": 3 },
"notes": { "$ref": "#/$defs/tree" }
},
"additionalProperties": true,
"$defs": {
"text": {
"type": "string",
"minLength": 1,
"maxLength": 2000,
"pattern": "\\S"
},
"style": {
"type": "string",
"description": "Code-map emphasis.",
"enum": ["default", "important", "focus", "core", "stable", "extension"]
},
"metadata": {
"type": "object",
"properties": {
"text": false,
"style": { "$ref": "#/$defs/style" }
},
"additionalProperties": true
},
"tree": {
"type": "object",
"properties": {
"_text": { "$ref": "#/$defs/text" },
"_meta": { "$ref": "#/$defs/metadata" }
},
"dependentRequired": { "_meta": ["_text"] },
"propertyNames": {
"anyOf": [
{ "enum": ["_text", "_meta"] },
{ "pattern": "^(?![A-Za-z]:/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*(?:^|/)_(?:[^_]|$))(?!.*[/]{2})(?!/)(?!.*[/]$)(?!.*[\\\\\\u0000-\\u001F\\u007F]).+$" }
]
},
"additionalProperties": { "$ref": "#/$defs/node" }
},
"node": {
"anyOf": [
{ "$ref": "#/$defs/text" },
{ "$ref": "#/$defs/tree" }
]
}
}
}