Schema Structure
This category uses the standard QR code category structure.Components Used
This category uses the following components:Schema
Copy
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "array",
"title": "Audio Category Schema",
"description": "Validate Audio category",
"items": {
"type": "object",
"required": [
"type",
"data"
],
"properties": {
"type": {
"type": "string",
"enum": [
"design_info",
"intro_page",
"main_page",
"page_layout"
]
},
"data": {
"type": "object"
}
},
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "design_info"
}
}
},
"then": {
"properties": {
"data": {
"type": "object",
"required": [
"color",
"fontFamily",
"fontSize"
],
"properties": {
"color": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"pattern": "^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$"
}
},
"additionalProperties": false
},
"fontFamily": {
"type": "string"
},
"fontSize": {
"type": "number"
},
"patternBgColor": {
"type": "string"
},
"patternImage": {
"type": "string"
}
},
"additionalProperties": false
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "intro_page"
}
}
},
"then": {
"properties": {
"data": {
"type": "object",
"required": [
"tagline",
"time"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"tagline": {
"type": "string"
},
"time": {
"type": "number"
}
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "main_page"
}
}
},
"then": {
"properties": {
"data": {
"type": "object",
"required": [
"pageLayout",
"files"
],
"properties": {
"pageTitle": {
"type": "string",
"maxLength": 100
},
"subHeading": {
"type": "string",
"maxLength": 200
},
"pageLayout": {
"type": "string",
"enum": [
"list",
"grid"
]
},
"files": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"required": [
"url"
],
"additionalProperties": false,
"properties": {
"url": {
"type": "string",
"format": "uri",
"pattern": "^(https?://.*\\.(mp3|wav|aac|m4a|MP3|WAV|AAC|M4A))$"
},
"name": {
"type": "string"
},
"fileName": {
"type": "string"
},
"thumbnail": {
"type": "string"
},
"description": {
"type": "string"
},
"size": {
"type": "number"
},
"mime": {
"type": "string",
"description": "MIME type of the audio file",
"minLength": 2
},
"tracking": {
"$ref": "components/event_tracking.json"
},
"type": {
"type": "string",
"description": "Type of the audio file",
"minLength": 2
}
}
}
}
}
}
}
}
}
]
}
}