{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/product.schema.json", "title": "Assets", "description": "A list of downloadable assets for Speed Dreams", "type": "object", "definitions": { "url": { "type": "string", "pattern": "^(http(s)*:\\/\\/)[-a-zA-Z0-9@:%._\\+~#=]{2,256}(\\.[a-z]{2,6})*\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$" }, "directory": { "type": "string", "pattern": "^[aA-zZ|\\-|_|0-9]+$" }, "number": { "type": "string", "pattern": "^\\d+$" }, "asset": { "type": "object", "required": [ "name", "author", "category", "license", "url", "hashtype", "hash", "size", "thumbnail", "directory", "revision" ], "properties": { "name": { "type": "string" }, "author": { "type": "string" }, "category": { "$ref": "#/definitions/directory" }, "url": { "$ref": "#/definitions/url" }, "license": { "type": "string" }, "hashtype": { "type": "string", "enum": [ "sha256" ] }, "hash": { "type": "string", "pattern": "^[aA-fF|0-9]+$" }, "size": { "$ref": "#/definitions/number" }, "thumbnail": { "$ref": "#/definitions/url" }, "directory": { "$ref": "#/definitions/directory" }, "revision": { "$ref": "#/definitions/number" } } }, "assets": { "type": "array", "items": { "$ref": "#/definitions/asset" } } }, "properties": { "cars": { "$ref": "#/definitions/assets" }, "tracks": { "$ref": "#/definitions/assets" }, "drivers": { "$ref": "#/definitions/assets" } } }