{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://service.metason.net/ar/schemas/extension.json",
    "title": "Extension",
    "description": "App Extension for ARchi VR version 3.2, see https://archi.metason.net",
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "id": {
                "type": "string",
                "description": "UUID, universal unique identifier, hint: use reverse DNS convention"
            },
            "type": {
                "type": "string",
                "enum": [
                    "Catalog",
                    "Service",
                    "Workflow",
                    "Curation",
                    "Detector",
                    "POI",
                    "Channel",
                    "Developer"
                ],
                "description": "extension type"
            },
            "name": {
                "type": "string",
                "description": "name displayed as title",
                "minLength": 1,
                "maxLength": 30
            },
            "desc": {
                "type": "string",
                "description": "description of extension"
            },
            "orga": {
                "type": "string",
                "description": "organisation or company providing the extension",
                "minLength": 4
            },
            "email": {
                "type": "string",
                "format": "email",
                "description": "email for support requests"
            },
            "orgaURL": {
                "type": "string",
                "format": "uri",
                "description": "URL to Web page of organisation",
                "minLength": 10
            },
            "logoURL": {
                "type": "string",
                "format": "uri",
                "description": "URL to extension logo, image size: 128x128 pixels"
            },
            "dataURL": {
                "type": "string",
                "format": "uri",
                "description": "URL for requesting extension"
            },
            "dataTransfer": {
                "type": "string",
                "description": "data posted to Web service in request",
                "default": "GET:JSON",
                "examples": [
                    "GET:JSON",
                    "POST:LOC",
                    "POST:USER",
                    "POST:SPACE",
                    "POST:SVG",
                    "POST:WEB3D",
                    "POST:OBJ",
                    "POST:PHOTO",
                    "POST:CAM",
                    "POST:SCREEN",
                    "POST:CONTEXT",
                    "POST:DETECTION",
                    "POST:HITS",
                    "POST:DEPTH",
                    "POST:MAP",
                    "POST:CAM, POST:CONTEXT"
                ]
            },
            "validUntil": {
                "type": "string",
                "format": "date",
                "description": "date until extension is valid"
            },
            "ref": {
                "type": "string",
                "description": "individual reference sent with request, optional"
            },
            "preCondition": {
                "type": "string",
                "description": "condition as expression whether enabled, optional",
                "examples": [
                    "subtype == 'Single Room'", 
                    "walls.@count > 2",
                    "ANY items.subtype == 'Damaged Area'",
                    "items[0].name BEGINSWITH 'Be'",
                    "data.var1 > 5.0",
                    "data.var2 == 'hello'",
                    "time.runtime > 10.0"
                ]
            }
        },
        "required": [
            "id",
            "type",
            "name",
            "desc",
            "orga",
            "email",
            "orgaURL",
            "logoURL",
            "dataURL",
            "dataTransfer",
            "validUntil"
        ],
        "additionalProperties": false
    },
    "minItems": 1,
    "uniqueItems": true
}
