{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/course.v1.json", "title": "wai.quantum.course/1", "description": "The circuits course (engine::course): as kept in course/course.json, every text in each locale, or as a surface serves it in one locale. Each lesson's exercise is a wai.quantum.exercise/1 document; a check of a program against it is a wai.quantum.course-check/1.", "anyOf": [ { "$ref": "#/$defs/manifest" }, { "$ref": "#/$defs/served" } ], "$defs": { "localized": { "type": "object", "required": [ "en", "zh-CN" ], "additionalProperties": false, "properties": { "en": { "type": "string", "minLength": 1 }, "zh-CN": { "type": "string", "minLength": 1 } } }, "manifest": { "description": "The course as kept (course/course.json): its locales, its units with their lessons in order, and its companion courses, every text in each locale.", "type": "object", "additionalProperties": false, "required": [ "schema", "id", "locales", "title", "summary", "units" ], "properties": { "schema": { "const": "wai.quantum.course/1" }, "id": { "type": "string" }, "locales": { "const": [ "en", "zh-CN" ] }, "translations": { "type": "object", "additionalProperties": { "type": "string" } }, "title": { "$ref": "#/$defs/localized" }, "summary": { "$ref": "#/$defs/localized" }, "units": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "lessons" ], "properties": { "id": { "type": "string" }, "title": { "$ref": "#/$defs/localized" }, "lessons": { "type": "array", "minItems": 1, "items": { "type": "string", "description": "A lesson's id: course/lessons//" } } } } }, "companions": { "type": "array", "description": "Other courses kept beside this one", "items": { "type": "object", "additionalProperties": false, "required": [ "id", "title", "summary", "url", "modules" ], "properties": { "id": { "type": "string" }, "title": { "$ref": "#/$defs/localized" }, "summary": { "$ref": "#/$defs/localized" }, "url": { "type": "string", "format": "uri" }, "modules": { "type": "array", "items": { "$ref": "#/$defs/localized" } } } } } } }, "served": { "type": "object", "description": "The course as a surface serves it, in one locale (engine::course::course): its units with their lessons' titles and numbers, the companion courses, where progress is kept, and for a translation its note.", "required": [ "schema", "id", "locale", "locales", "title", "summary", "lessons", "units" ], "properties": { "schema": { "const": "wai.quantum.course/1" }, "id": { "type": "string" }, "locale": { "type": "string" }, "locales": { "type": "array", "items": { "type": "string" } }, "title": { "type": "string" }, "summary": { "type": "string" }, "lessons": { "type": "integer", "minimum": 0 }, "units": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "lessons": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "number": { "type": "integer" }, "title": { "type": "string" } } } } } } }, "companions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "summary": { "type": "string" }, "url": { "type": "string" }, "modules": { "type": "array", "items": { "type": "string" } } } } }, "kept": { "type": "string" }, "translation": {} } } } }