{
    "id": "http://qt.io/schema/extension-schema-v1#",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "The Qt Company Marketplace Extension Schema",
    "type": "object",
    "properties": {
        "title": {
            "type": "string"
        }, 
        "extensionType": { 
            "type": "array", 
            "items": {
                "type": "string",
                "enum": ["tool", "library", "creatorExtension"]
            },
            "minItems": 1,
            "examples": [
                "Qt Creator plugin would be both a library and creatorExtension"
            ]
        },
        "version": { 
            "type": "string", 
            "examples": [
                "major[.minor[.build]]"
            ]
        },
        "vendor": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            }
        },
        "contact": { 
            "type": "string",
            "examples": [
                "[Firstname] [Lastname] Vendor email"
            ]
        },
        "copyright": {
            "type": "array", 
            "items": {
                "type": "string",
                "examples": [
                    "vendor@com, author@gmail.com"
                ]
            }
        },
        "authors": {
            "type": "array", 
            "items": {
                "type": "string"
            }
        },
        "from": {
            "type": "string"
        },
        "icon": {
            "type": "string"
        },
        "licenses": {
           "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "licenseType": {
                        "type": "string"
                    },
                    "licenseUrl": {
                        "type": "string"
                    }
                },
                "required": [ "licenseType",
                    "licenseUrl" ]
            }
        }, 
        "created": { 
            "type": "string",
            "examples": [
                "YYYY-MM-DD"
            ]
        },
        "lastUpdate": {
            "type": "string"
        },
        "platforms": {
            "type": "array", 
                "items": {
                "type": "string",
                "examples": [
                        "macOS 10.14", "Android 8.0-or-later", "iOS 13.1", "Ubuntu 19.04", "Windows 10", "QNX 7.0", "Integrity", "Linux" 
                ]
            }        
        },
        "architectures": {
            "type": "array", 
                "items": {
                "type": "string",
                "examples": [
                    "x86", "armv7", "armv8", "MIPS"
                ]
            }
        },
        "compilers": {
            "type": "array", 
                "items": {
                "type": "string",
                "examples": [
                    "MSVC 2015", "Clang 3.3", "MinGw 7", "gcc 9.2"
                ]
            }
        },
        "qtVersions": {
            "type": "array", 
            "items": {
                "type": "string",
                "examples": [
                    "5.5", "5.13.1", "5.6-or-later", "any"
                ]
            },
            "minItems": 1
        },
        "supportedQtCreatorVersions": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "examples": [
                "4.8", "4.9-or-later"
            ]
        },
        "supportedDesignStudioVersions": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "examples": [
                "1.4", "1.5-or-later"
            ]
        },
        "collections": { 
            "type": "array",
            "items": {
                "type": "string"
            },
            "examples": [
                "Look at available collections in marketplace.qt.io"
            ]
        },
        "tags": { 
            "type": "array",
            "items": {
                "type": "string"
            },
            "examples": [
                "Look at available tags in marketplace.qt.io. Custom tags allowed. Tags are used to filter products in collections."
            ]
        },
        "price": {
            "type": "object",
            "properties": {
                "listprice": {
                    "type": "number",
                    "examples": [
                        "in dollars"
                    ]
                },
                "discount": { 
                    "type": "number",
                    "examples": [
                        "in percentages"
                    ]
                },
                "orderType": {
                    "type": "string",
                    "enum": [ "subscription", "single" ]
                },
                "period": { 
                    "type": "number",
                    "examples": [
                        "in months"
                    ]
                }
            },
            "required": [ "listprice" ]
        },
        "support": { 
            "type": "string",
            "examples": [
                "URL or email"
            ]
        },
        "bugUrl": {
            "type": "string"
        },
        "packages": { 
            "type": "array",
            "items": {
                "type": "string"
            },
            "examples": [
                "ready made source packages"
            ]
        },
        "sourceRepoUrl": {
            "type": "string"
        },
        "binaryRepoUrl": { 
            "type": "string",
            "examples": [
                "only for commercial extensions, if extension binary is downloadable somewhere"
            ]
        },
        "userManuals": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "examples": [
                "URL"
           ]
        },
        "dependencies": { 
            "type": "array",
            "items": {
                "type": "string"
            },
            "examples": [
                "Core 5.13", "GUI 5.12-or-later", "Widgets 5.0"
           ]
        }
    },
    "required": [ 
        "$schema",
        "title",
        "extensionType",
        "version",
        "vendor",
        "contact",
        "licenses",
        "created",
        "platforms",
        "qtVersions"
    ]
}