Based on https://github.com/learningequality/le-utils/pull/117, an embed schema was designed to validate inputs received by our /embed api. However the splitting of the embed api to /embed-topics and /embed-content requires a split in the embed schema too.
Description and outcomes
The current schema has both topics and resources fields. The goal is to split it into two as detailed below;
Create a new schema named schema-embed_topics_request.json in the spec folder
It should validate the topics field only
Add validation to prevent empty topics list inputs
Create a new schema named schema-embed_content_request.json in the spec folder. Alternatively you could rename the current schema
It should validate the resources field only
Add validation to prevent empty resources list inputs
The metadata field should remain in both files for logging purposes
Run make build to regenerate the relevant schema files
Update/add relevant validators in l/e_utils/validators
Overview
Based on https://github.com/learningequality/le-utils/pull/117, an embed schema was designed to validate inputs received by our
/embed
api. However the splitting of the embed api to/embed-topics
and/embed-content
requires a split in the embed schema too.Description and outcomes
The current schema has both
topics
andresources
fields. The goal is to split it into two as detailed below;topics
field onlytopics
list inputsresources
field onlyresources
list inputsmetadata
field should remain in both files for logging purposesmake build
to regenerate the relevant schema filesl/e_utils/validators
Resources
Accessibility Requirements
NA