|
26 | 26 | "description": "Language code from https://github.com/learningequality/le-utils/blob/main/le_utils/resources/languagelookup.json", |
27 | 27 | "pattern": "^[a-z]{2,3}(?:-[a-zA-Z]+)*$", |
28 | 28 | }, |
29 | | - "url": { |
30 | | - "type": "string", |
31 | | - "pattern": "^(https?:\\/\\/(?:storage\\.cloud\\.google\\.com|localhost(?::[0-9]+)?)\\/[a-z0-9-._~!$&'()*+,;=:@%\\/\\?]+)$", |
32 | | - }, |
| 29 | + "url": {"type": "string", "pattern": "^(https?:\\/\\/(?:storage\\.cloud\\.google\\.com|localhost(?::[0-9]+)?)\\/[a-z0-9-._~!$&'()*+,;=:@%\\/\\?]+)$"}, |
33 | 30 | "preset": { |
34 | 31 | "type": "string", |
35 | 32 | "description": "Presets from https://github.com/learningequality/le-utils/blob/main/le_utils/constants/format_presets.py", |
|
70 | 67 | "file": { |
71 | 68 | "type": "object", |
72 | 69 | "additionalProperties": False, |
73 | | - "properties": { |
74 | | - "url": {"$ref": "#/definitions/url"}, |
75 | | - "preset": {"$ref": "#/definitions/preset"}, |
76 | | - "language": {"$ref": "#/definitions/language"}, |
77 | | - }, |
| 70 | + "properties": {"url": {"$ref": "#/definitions/url"}, "preset": {"$ref": "#/definitions/preset"}, "language": {"$ref": "#/definitions/language"}}, |
78 | 71 | "required": ["url", "preset"], |
79 | 72 | }, |
80 | 73 | "resource": { |
81 | 74 | "type": "object", |
82 | 75 | "description": "The key textual metadata and data for a content resource", |
83 | 76 | "additionalProperties": False, |
84 | 77 | "properties": { |
85 | | - "id": { |
86 | | - "$ref": "#/definitions/uuid", |
87 | | - "description": "The UUID of the content resource", |
88 | | - }, |
89 | | - "channel_id": { |
90 | | - "$ref": "#/definitions/uuid", |
91 | | - "description": "The UUID of the channel that the content resource belongs to", |
92 | | - }, |
93 | | - "title": { |
94 | | - "type": "string", |
95 | | - "description": "The title of the content resource", |
96 | | - }, |
97 | | - "description": { |
98 | | - "type": "string", |
99 | | - "description": "The description of the content resource", |
100 | | - }, |
101 | | - "text": { |
102 | | - "type": "string", |
103 | | - "description": "Optional textual content to include in the embedding", |
104 | | - }, |
| 78 | + "id": {"$ref": "#/definitions/uuid", "description": "The UUID of the content resource"}, |
| 79 | + "channel_id": {"$ref": "#/definitions/uuid", "description": "The UUID of the channel that the content resource belongs to"}, |
| 80 | + "title": {"type": "string", "description": "The title of the content resource"}, |
| 81 | + "description": {"type": "string", "description": "The description of the content resource"}, |
| 82 | + "text": {"type": "string", "description": "Optional textual content to include in the embedding"}, |
105 | 83 | "language": {"$ref": "#/definitions/language"}, |
106 | | - "files": { |
107 | | - "type": "array", |
108 | | - "description": "A list of files associated with the content resource", |
109 | | - "items": {"$ref": "#/definitions/file"}, |
110 | | - }, |
111 | | - "content_id": { |
112 | | - "$ref": "#/definitions/uuid", |
113 | | - "description": "The UUID of the content resource(s)", |
114 | | - }, |
115 | | - "channel_version": { |
116 | | - "type": "integer", |
117 | | - "description": "The version number of the channel that the content resource belongs to", |
118 | | - }, |
| 84 | + "files": {"type": "array", "description": "A list of files associated with the content resource", "items": {"$ref": "#/definitions/file"}}, |
| 85 | + "content_id": {"$ref": "#/definitions/uuid", "description": "The UUID of the content resource(s)"}, |
| 86 | + "channel_version": {"type": "integer", "description": "The version number of the channel that the content resource belongs to"}, |
119 | 87 | }, |
120 | | - "required": [ |
121 | | - "id", |
122 | | - "channel_id", |
123 | | - "title", |
124 | | - "description", |
125 | | - "content_id", |
126 | | - "channel_version", |
127 | | - ], |
| 88 | + "required": ["id", "channel_id", "title", "description", "content_id", "channel_version"], |
128 | 89 | }, |
129 | 90 | }, |
130 | 91 | "properties": { |
131 | | - "resources": { |
132 | | - "type": "array", |
133 | | - "description": "A list of content resources to embed", |
134 | | - "items": {"$ref": "#/definitions/resource"}, |
135 | | - }, |
136 | | - "metadata": { |
137 | | - "type": "object", |
138 | | - "description": "The metadata of the channel for logging purposes", |
139 | | - }, |
| 92 | + "resources": {"type": "array", "description": "A list of content resources to embed", "items": {"$ref": "#/definitions/resource"}}, |
| 93 | + "metadata": {"type": "object", "description": "The metadata of the channel for logging purposes"}, |
140 | 94 | }, |
141 | 95 | "required": ["resources"], |
142 | 96 | } |
0 commit comments