Skip to content

Commit 3ded0ed

Browse files
committed
Update embed schemas for newly required fields, channel_id and language
1 parent ebb6894 commit 3ded0ed

7 files changed

Lines changed: 140 additions & 49 deletions

js/EmbedContentRequest.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ export const SCHEMA = {
8484
"$ref": "/schemas/common_embed_definitions#/definitions/uuid",
8585
"description": "The UUID of the content resource"
8686
},
87+
"channel_id": {
88+
"$ref": "/schemas/common_embed_definitions#/definitions/uuid",
89+
"description": "The UUID of the channel that the content resource belongs to"
90+
},
8791
"title": {
8892
"type": "string",
8993
"description": "The title of the content resource"
@@ -94,7 +98,7 @@ export const SCHEMA = {
9498
},
9599
"text": {
96100
"type": "string",
97-
"description": "The cleaned up text extracted from the content resource (in markdown or plaintext format)"
101+
"description": "Optional textual content to include in the embedding"
98102
},
99103
"language": {
100104
"$ref": "#/definitions/language"
@@ -113,9 +117,9 @@ export const SCHEMA = {
113117
},
114118
"required": [
115119
"id",
120+
"channel_id",
116121
"title",
117122
"description",
118-
"text",
119123
"content_id"
120124
]
121125
}

js/EmbedTopicsRequest.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const SCHEMA = {
1111
"additionalProperties": false,
1212
"definitions": {
1313
"id": {
14-
"type": "string",
14+
"$ref": "/schemas/common_embed_definitions#/definitions/uuid",
1515
"description": "The ID of the topic content node on Studio"
1616
},
1717
"title": {
@@ -90,7 +90,8 @@ export const SCHEMA = {
9090
"required": [
9191
"id",
9292
"title",
93-
"description"
93+
"description",
94+
"language"
9495
]
9596
}
9697
},

le_utils/constants/embed_content_request.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@
8181
"$ref": "/schemas/common_embed_definitions#/definitions/uuid",
8282
"description": "The UUID of the content resource",
8383
},
84+
"channel_id": {
85+
"$ref": "/schemas/common_embed_definitions#/definitions/uuid",
86+
"description": "The UUID of the channel that the content resource belongs to",
87+
},
8488
"title": {
8589
"type": "string",
8690
"description": "The title of the content resource",
@@ -91,7 +95,7 @@
9195
},
9296
"text": {
9397
"type": "string",
94-
"description": "The cleaned up text extracted from the content resource (in markdown or plaintext format)",
98+
"description": "Optional textual content to include in the embedding",
9599
},
96100
"language": {"$ref": "#/definitions/language"},
97101
"files": {
@@ -104,7 +108,7 @@
104108
"description": "The UUID of the content resource(s)",
105109
},
106110
},
107-
"required": ["id", "title", "description", "text", "content_id"],
111+
"required": ["id", "channel_id", "title", "description", "content_id"],
108112
},
109113
},
110114
"properties": {

le_utils/constants/embed_topics_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"additionalProperties": False,
1818
"definitions": {
1919
"id": {
20-
"type": "string",
20+
"$ref": "/schemas/common_embed_definitions#/definitions/uuid",
2121
"description": "The ID of the topic content node on Studio",
2222
},
2323
"title": {"type": "string", "description": "The title of the topic"},
@@ -63,7 +63,7 @@
6363
"language": {"$ref": "#/definitions/language"},
6464
"ancestors": {"$ref": "#/definitions/ancestors"},
6565
},
66-
"required": ["id", "title", "description"],
66+
"required": ["id", "title", "description", "language"],
6767
},
6868
},
6969
"properties": {

spec/schema-embed_content_request.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
"$ref": "/schemas/common_embed_definitions#/definitions/uuid",
8080
"description": "The UUID of the content resource"
8181
},
82+
"channel_id": {
83+
"$ref": "/schemas/common_embed_definitions#/definitions/uuid",
84+
"description": "The UUID of the channel that the content resource belongs to"
85+
},
8286
"title": {
8387
"type": "string",
8488
"description": "The title of the content resource"
@@ -89,7 +93,7 @@
8993
},
9094
"text": {
9195
"type": "string",
92-
"description": "The cleaned up text extracted from the content resource (in markdown or plaintext format)"
96+
"description": "Optional textual content to include in the embedding"
9397
},
9498
"language": {
9599
"$ref": "#/definitions/language"
@@ -108,9 +112,9 @@
108112
},
109113
"required": [
110114
"id",
115+
"channel_id",
111116
"title",
112117
"description",
113-
"text",
114118
"content_id"
115119
]
116120
}

spec/schema-embed_topics_request.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"additionalProperties": false,
77
"definitions": {
88
"id": {
9-
"type": "string",
9+
"$ref": "/schemas/common_embed_definitions#/definitions/uuid",
1010
"description": "The ID of the topic content node on Studio"
1111
},
1212
"title": {
@@ -85,7 +85,8 @@
8585
"required": [
8686
"id",
8787
"title",
88-
"description"
88+
"description",
89+
"language"
8990
]
9091
}
9192
},

0 commit comments

Comments
 (0)