-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathembed_topics_request.py
More file actions
70 lines (65 loc) · 3.13 KB
/
Copy pathembed_topics_request.py
File metadata and controls
70 lines (65 loc) · 3.13 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
# -*- coding: utf-8 -*-
# Generated by scripts/generate_from_specs.py
from __future__ import unicode_literals
# EmbedTopicsRequest
choices = ()
EMBEDTOPICSREQUESTLIST = []
SCHEMA = {
"$id": "/schemas/embed_topics_request",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Schema for embed topics 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",
},
"title": {"type": "string", "description": "The title of the topic"},
"description": {"type": "string", "description": "The description of the topic"},
"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]+)*$",
},
"level": {"type": "integer", "description": "The level of the ancestor, where the root is 0 and the parent is the highest level"},
"ancestor": {
"type": "object",
"description": "An ancestor in the tree structure",
"additionalProperties": False,
"properties": {
"id": {"$ref": "#/definitions/uuid", "description": "The ID of the topic content node on Studio"},
"title": {"$ref": "#/definitions/title"},
"description": {"$ref": "#/definitions/description"},
"language": {"$ref": "#/definitions/language"},
"level": {"$ref": "#/definitions/level"},
},
"required": ["id", "title", "description", "level"],
},
"ancestors": {
"type": "array",
"description": "The ancestors of the topic. Please see 'level' in the ancestor schema for more information",
"items": {"$ref": "#/definitions/ancestor"},
},
"topic": {
"type": "object",
"description": "A topic in the tree structure",
"additionalProperties": False,
"properties": {
"id": {"$ref": "#/definitions/uuid", "description": "The ID of the topic content node on Studio"},
"channel_id": {"$ref": "#/definitions/uuid", "description": "The UUID of the channel that the topic belongs to"},
"title": {"$ref": "#/definitions/title"},
"description": {"$ref": "#/definitions/description"},
"language": {"$ref": "#/definitions/language"},
"ancestors": {"$ref": "#/definitions/ancestors"},
},
"required": ["id", "channel_id", "title", "description", "language"],
},
},
"properties": {
"topics": {"type": "array", "description": "A list of topics to embed", "items": {"$ref": "#/definitions/topic"}},
"metadata": {"type": "object", "description": "The metadata of the channel for logging purposes"},
},
"required": ["topics"],
}