| 1 |
{ |
| 2 |
"$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 |
"title": "chillerlan php-qrcode schema", |
| 4 |
"type": "object", |
| 5 |
"required": [ |
| 6 |
"qrcode" |
| 7 |
], |
| 8 |
"properties": { |
| 9 |
"qrcode": { |
| 10 |
"$ref": "#/$defs/qrcode" |
| 11 |
} |
| 12 |
}, |
| 13 |
"$defs": { |
| 14 |
"qrcode": { |
| 15 |
"description": "QR Code root element", |
| 16 |
"type": "object", |
| 17 |
"required": [ |
| 18 |
"eccLevel", |
| 19 |
"matrix", |
| 20 |
"version" |
| 21 |
], |
| 22 |
"properties": { |
| 23 |
"version": { |
| 24 |
"description": "The QR Code version: [1...40]", |
| 25 |
"type": "integer", |
| 26 |
"minimum": 1, |
| 27 |
"maximum": 40 |
| 28 |
}, |
| 29 |
"eccLevel": { |
| 30 |
"description": "The ECC level: [L, M, Q, H]", |
| 31 |
"enum": [ |
| 32 |
"L", |
| 33 |
"M", |
| 34 |
"Q", |
| 35 |
"H" |
| 36 |
] |
| 37 |
}, |
| 38 |
"matrix": { |
| 39 |
"$ref": "#/$defs/matrix" |
| 40 |
} |
| 41 |
} |
| 42 |
}, |
| 43 |
"matrix": { |
| 44 |
"description": "The matrix holds the encoded data in a 2-dimensional array of modules.", |
| 45 |
"type": "object", |
| 46 |
"required": [ |
| 47 |
"size", |
| 48 |
"quietzoneSize", |
| 49 |
"maskPattern", |
| 50 |
"width", |
| 51 |
"height" |
| 52 |
], |
| 53 |
"properties": { |
| 54 |
"size": { |
| 55 |
"description": "The side length of the QR symbol, excluding the quiet zone (version * 4 + 17). [21...177]", |
| 56 |
"type": "integer", |
| 57 |
"minimum": 21, |
| 58 |
"maximum": 177 |
| 59 |
}, |
| 60 |
"quietzoneSize": { |
| 61 |
"description": "The size of the quiet zone (margin around the QR symbol).", |
| 62 |
"type": "integer", |
| 63 |
"minimum": 0 |
| 64 |
}, |
| 65 |
"maskPattern": { |
| 66 |
"description": "The detected mask pattern that was used to mask this matrix. [0...7].", |
| 67 |
"type": "integer", |
| 68 |
"minimum": 0, |
| 69 |
"maximum": 7 |
| 70 |
}, |
| 71 |
"width": { |
| 72 |
"description": "The total width of the matrix, including the quiet zone.", |
| 73 |
"type": "integer", |
| 74 |
"minimum": 21 |
| 75 |
}, |
| 76 |
"height": { |
| 77 |
"description": "The total height of the matrix, including the quiet zone.", |
| 78 |
"type": "integer", |
| 79 |
"minimum": 21 |
| 80 |
}, |
| 81 |
"rows": { |
| 82 |
"type": "array", |
| 83 |
"items": { |
| 84 |
"$ref": "#/$defs/row" |
| 85 |
}, |
| 86 |
"minItems": 0 |
| 87 |
} |
| 88 |
} |
| 89 |
}, |
| 90 |
"row": { |
| 91 |
"description": "A row holds an array of modules", |
| 92 |
"type": "object", |
| 93 |
"required": [ |
| 94 |
"y", |
| 95 |
"modules" |
| 96 |
], |
| 97 |
"properties": { |
| 98 |
"y": { |
| 99 |
"description": "The 'y' (vertical) coordinate of this row.", |
| 100 |
"type": "integer", |
| 101 |
"minimum": 0 |
| 102 |
}, |
| 103 |
"modules": { |
| 104 |
"type": "array", |
| 105 |
"items": { |
| 106 |
"$ref": "#/$defs/module" |
| 107 |
}, |
| 108 |
"minItems": 0 |
| 109 |
} |
| 110 |
} |
| 111 |
}, |
| 112 |
"module": { |
| 113 |
"description": "Represents a single module (pixel) of a QR symbol.", |
| 114 |
"type": "object", |
| 115 |
"required": [ |
| 116 |
"dark", |
| 117 |
"layer", |
| 118 |
"value", |
| 119 |
"x" |
| 120 |
], |
| 121 |
"properties": { |
| 122 |
"dark": { |
| 123 |
"description": "Indicates whether this module is dark.", |
| 124 |
"type": "boolean" |
| 125 |
}, |
| 126 |
"layer": { |
| 127 |
"description": "The layer (functional pattern) this module belongs to.", |
| 128 |
"type": "string" |
| 129 |
}, |
| 130 |
"value": { |
| 131 |
"description": "The value for this module.", |
| 132 |
"type": "string" |
| 133 |
}, |
| 134 |
"x": { |
| 135 |
"description": "The 'x' (horizontal) coordinate of this module.", |
| 136 |
"type": "integer", |
| 137 |
"minimum": 0 |
| 138 |
} |
| 139 |
} |
| 140 |
} |
| 141 |
} |
| 142 |
} |