-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathembed_topics_request.py
81 lines (76 loc) · 2.91 KB
/
embed_topics_request.py
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
# -*- 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": {
"id": {
"type": "string",
"description": "The ID of the topic content node on Studio",
},
"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/id"},
"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/id"},
"title": {"$ref": "#/definitions/title"},
"description": {"$ref": "#/definitions/description"},
"language": {"$ref": "#/definitions/language"},
"ancestors": {"$ref": "#/definitions/ancestors"},
},
"required": ["id", "title", "description"],
},
},
"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"],
}