Schema Structure
This category uses the standard QR code category structure.Schema
Copy
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "App Deep Link QR Code",
"description": "Validate app deep link schema",
"type": "array",
"additionalProperties": false,
"items": {
"type": "object",
"required": [
"type",
"data"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"intentUri",
"appStore",
"fallback"
]
},
"data": {
"type": [
"object",
"array"
]
}
},
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "intentUri"
}
}
},
"then": {
"properties": {
"data": {
"type": "array",
"title": "Intent URIs",
"additionalProperties": false,
"items": {
"type": "object",
"required": [
"type",
"uri"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"android",
"ios"
]
},
"uri": {
"type": "string",
"minLength": 5,
"pattern": "^([a-zA-Z][a-zA-Z0-9+.-]*):\\/\\/(\\S+)$"
}
}
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "appStore"
}
}
},
"then": {
"properties": {
"data": {
"type": "array",
"title": "App store URLs",
"additionalProperties": false,
"items": {
"type": "object",
"required": [
"type",
"url"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"playStore",
"appleStore"
]
},
"url": {
"type": "string",
"description": "Link to the app store",
"minLength": 5,
"format": "uri",
"pattern": "(http://www\\.|https://www\\.|http://|https://)?[a-z0-9]+([\\-.][a-z0-9]+)*\\.[a-z]{2,10}(:[0-9]{1,5})?(/.*)?$"
}
}
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "fallback"
}
}
},
"then": {
"properties": {
"data": {
"type": "object",
"required": [
"url"
],
"additionalProperties": false,
"properties": {
"url": {
"type": "string",
"description": "Fallback URL",
"minLength": 5,
"format": "uri",
"pattern": "(http://www\\.|https://www\\.|http://|https://)?[a-z0-9]+([\\-.][a-z0-9]+)*\\.[a-z]{2,10}(:[0-9]{1,5})?(/.*)?$"
}
}
}
}
}
}
]
}
}