-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathschema-embed_content_request.json
More file actions
146 lines (146 loc) · 4.07 KB
/
schema-embed_content_request.json
File metadata and controls
146 lines (146 loc) · 4.07 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{
"$id": "/schemas/embed_content_request",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Schema for embed content requests received by RayServe",
"additionalProperties": false,
"definitions": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
"description": "A unique identifier in the form of a UUID"
},
"language": {
"type": "string",
"description": "Language code from https://github.com/learningequality/le-utils/blob/main/le_utils/resources/languagelookup.json",
"pattern": "^[a-z]{2,3}(?:-[a-zA-Z]+)?$"
},
"url": {
"type": "string",
"pattern": "^(https?:\\/\\/(?:storage\\.cloud\\.google\\.com|localhost(?::[0-9]+)?)\\/[a-z0-9-._~!$&'()*+,;=:@%\\/\\?]+)$"
},
"preset": {
"type": "string",
"description": "Presets from https://github.com/learningequality/le-utils/blob/main/le_utils/constants/format_presets.py",
"enum": [
"high_res_video",
"low_res_video",
"video_thumbnail",
"video_subtitle",
"video_dependency",
"audio",
"audio_thumbnail",
"audio_dependency",
"document",
"epub",
"document_thumbnail",
"exercise",
"exercise_thumbnail",
"exercise_image",
"exercise_graphie",
"channel_thumbnail",
"topic_thumbnail",
"html5_zip",
"html5_dependency",
"html5_thumbnail",
"h5p",
"h5p_thumbnail",
"zim",
"zim_thumbnail",
"qti",
"qti_thumbnail",
"slideshow_image",
"slideshow_thumbnail",
"slideshow_manifest",
"imscp_zip",
"bloompub"
]
},
"file": {
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"$ref": "#/definitions/url"
},
"preset": {
"$ref": "#/definitions/preset"
},
"language": {
"$ref": "#/definitions/language"
}
},
"required": [
"url",
"preset"
]
},
"resource": {
"type": "object",
"description": "The key textual metadata and data for a content resource",
"additionalProperties": false,
"properties": {
"id": {
"$ref": "#/definitions/uuid",
"description": "The UUID of the content resource"
},
"channel_id": {
"$ref": "#/definitions/uuid",
"description": "The UUID of the channel that the content resource belongs to"
},
"title": {
"type": "string",
"description": "The title of the content resource"
},
"description": {
"type": "string",
"description": "The description of the content resource"
},
"text": {
"type": "string",
"description": "Optional textual content to include in the embedding"
},
"language": {
"$ref": "#/definitions/language"
},
"files": {
"type": "array",
"description": "A list of files associated with the content resource",
"items": {
"$ref": "#/definitions/file"
}
},
"content_id": {
"$ref": "#/definitions/uuid",
"description": "The UUID of the content resource(s)"
},
"channel_version": {
"type": "integer",
"description": "The version number of the channel that the content resource belongs to"
}
},
"required": [
"id",
"channel_id",
"title",
"description",
"content_id",
"channel_version"
]
}
},
"properties": {
"resources": {
"type": "array",
"description": "A list of content resources to embed",
"items": {
"$ref": "#/definitions/resource"
}
},
"metadata": {
"type": "object",
"description": "The metadata of the channel for logging purposes"
}
},
"required": ["resources"]
}