Skip to content

Commit

Permalink
Adds level property to the ancestors schema definition
Browse files Browse the repository at this point in the history
  • Loading branch information
akolson committed Feb 1, 2024
1 parent 415210b commit 258e663
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
9 changes: 8 additions & 1 deletion js/EmbedTopicsRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ export const SCHEMA = {
"type": "array",
"description": "The ancestors of the topic, in order, from the parent to the root",
"items": {
"$ref": "#/definitions/topic"
"$ref": "#/definitions/topic",
"properties": {
"level": {
"type": "integer",
"description": "The level of the ancestor, where the parent is 1 and the root is the highest level"
}
},
"required": ["level"]
}
},
"language": {
Expand Down
11 changes: 10 additions & 1 deletion le_utils/constants/embed_topics_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@
"ancestors": {
"type": "array",
"description": "The ancestors of the topic, in order, from the parent to the root",
"items": {"$ref": "#/definitions/topic"},
"items": {
"$ref": "#/definitions/topic",
"properties": {
"level": {
"type": "integer",
"description": "The level of the ancestor, where the parent is 1 and the root is the highest level",
}
},
"required": ["level"],
},
},
"language": {
"type": "string",
Expand Down
9 changes: 8 additions & 1 deletion spec/schema-embed_topics_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
"type": "array",
"description": "The ancestors of the topic, in order, from the parent to the root",
"items": {
"$ref": "#/definitions/topic"
"$ref": "#/definitions/topic",
"properties": {
"level": {
"type": "integer",
"description": "The level of the ancestor, where the parent is 1 and the root is the highest level"
}
},
"required": ["level"]
}
},
"language": {
Expand Down

0 comments on commit 258e663

Please sign in to comment.