forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencodegraph.schema.json
More file actions
82 lines (82 loc) · 2.52 KB
/
opencodegraph.schema.json
File metadata and controls
82 lines (82 loc) · 2.52 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "opencodegraph.schema.json#",
"title": "OpenCodeGraphData",
"description": "Metadata about code",
"allowComments": true,
"type": "object",
"additionalProperties": false,
"required": ["items", "annotations"],
"properties": {
"items": {
"type": "array",
"items": { "$ref": "#/definitions/OpenCodeGraphItem" }
},
"annotations": {
"type": "array",
"items": { "$ref": "#/definitions/OpenCodeGraphAnnotation" }
}
},
"definitions": {
"OpenCodeGraphItem": {
"type": "object",
"additionalProperties": false,
"required": ["id", "title"],
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"detail": { "type": "string" },
"url": { "description": "An external URL with more information.", "type": "string", "format": "uri" },
"preview": { "description": "Show a preview of the link.", "type": "boolean" },
"previewUrl": {
"description": "If `preview` is set, show this URL as the preview instead of `url`.",
"type": "string"
},
"image": { "$ref": "#/definitions/OpenCodeGraphImage" }
}
},
"OpenCodeGraphImage": {
"type": "object",
"additionalProperties": false,
"required": ["url"],
"properties": {
"url": { "type": "string", "format": "uri" },
"width": { "type": "number" },
"height": { "type": "number" },
"alt": { "type": "string" }
}
},
"OpenCodeGraphAnnotation": {
"type": "object",
"additionalProperties": false,
"required": ["range", "item"],
"properties": {
"range": { "$ref": "#/definitions/OpenCodeGraphRange" },
"item": {
"title": "OpenCodeGraphItemRef",
"type": "object",
"additionalProperties": false,
"required": ["id"],
"properties": {
"id": { "type": "string" }
}
}
}
},
"OpenCodeGraphRange": {
"type": "object",
"additionalProperties": false,
"required": ["start", "end"],
"properties": {
"start": { "$ref": "#/definitions/OpenCodeGraphPosition" },
"end": { "$ref": "#/definitions/OpenCodeGraphPosition" }
}
},
"OpenCodeGraphPosition": {
"type": "object",
"additionalProperties": false,
"required": ["line", "character"],
"properties": { "line": { "type": "integer" }, "character": { "type": "integer" } }
}
}
}