Permalink
Fetching contributors…
Cannot retrieve contributors at this time
157 lines (157 sloc) 4.07 KB
{
"description" : "Playback sсhema",
"type" : "object",
"additionalProperties" : false,
"required" : ["type"],
"properties" : {
"type" : {
"description" : "Playback type",
"type" : "string",
"enum" : ["random", "sequential", "quest"]
},
"order" : {
"type" : "array",
"description" : "Ordered list of children UUDs for random or sequential types.",
"uniqueItems" : true,
"items" : {
"type" : "string"
}
},
"segments" : {
"description" : "Array of ordered segments, see segment's number.",
"type" : "array",
"minItems" : 1,
"uniqueItems" : true,
"items" : {
"description" : "Segment",
"type" : "object",
"required" : ["number",
"items"],
"additionalProperties" : false,
"properties" : {
"number" : {
"type" : "number",
"minimum" : 1,
"description" : "Segment number, numbering started from 1 - first is always opened segment"
},
"items" : {
"description" : "Ordered list (as in CMS) of items UUIDs assigned to the segment",
"type" : "array",
"minItems" : 1,
"uniqueItems" : true,
"items" : {
"type" : "string"
}
},
"open_segment_when" : {
"description" : "Opening conditions",
"oneOf" : [{
"$ref" : "#/definitions/bool_or"
}, {
"$ref" : "#/definitions/bool_and"
}
]
},
"route" : {
"description" : "Optional route of segment, in KML format",
"type" : "string"
},
"end_quest_when" : {
"description" : "Opening conditions",
"oneOf" : [{
"$ref" : "#/definitions/bool_or"
}, {
"$ref" : "#/definitions/bool_and"
}
]
}
}
}
}
},
"definitions" : {
"bool_and" : {
"type" : "object",
"properties" : {
"and" : {
"type" : "array",
"minItems" : 1,
"uniqueItems" : true,
"items" : {
"$ref" : "#/definitions/condition"
}
}
},
"required" : ["and"],
"additionalProperties" : false
},
"bool_or" : {
"type" : "object",
"properties" : {
"or" : {
"type" : "array",
"minItems" : 1,
"uniqueItems" : true,
"items" : {
"$ref" : "#/definitions/condition"
}
}
},
"required" : ["or"],
"additionalProperties" : false
},
"condition" : {
"anyOf" : [{
"$ref" : "#/definitions/quiz_condition"
}, {
"$ref" : "#/definitions/trigger_zone_condition"
}
]
},
"quiz_condition" : {
"description" : "Quiz condition ",
"type" : "object",
"required" : ["quiz_condition"],
"additionalProperties" : false,
"properties" : {
"quiz_condition" : {
"type" : "object",
"description" : "Quiz schema",
"additionalProperties" : false,
"properties" : {
"item" : {
"type" : "string"
},
"correct_answered" : {
"type" : "boolean"
}
},
"required" : ["item"]
}
}
},
"trigger_zone_condition" : {
"description" : "Trigger zone condition ",
"type" : "object",
"required" : ["trigger_zone_condition"],
"additionalProperties" : false,
"properties" : {
"trigger_zone_condition" : {
"type" : "object",
"description" : "Trigger Zone schema",
"additionalProperties" : false,
"properties" : {
"item" : {
"type" : "string"
},
"type" : {
"type" : "string",
"enum" : ["item"]
}
},
"required" : ["item", "type"]
}
}
}
}
}