{
    "$id": "http://asset-pipe/schemas/definitions.json",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]*$"
        },
        "version": {
            "type": "string",
            "minLength": 5,
            "pattern": "[0-9]+.[0-9]+.[0-9]+"
        },
        "organisation": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100,
            "pattern": "^[a-zA-Z0-9_-]*$"
        },
        "server": {
            "type": "string",
            "minLength": 7,
            "pattern": "^https?://[a-zA-Z0-9-_./]+(:[0-9]+)?"
        },
        "js": {
            "type": "object",
            "properties": {
                "input": {
                    "$ref": "definitions.json#/definitions/input",
                    "default": ""
                },
                "options": {
                    "$ref": "definitions.json#/definitions/js_options",
                    "additionalProperties": false,
                    "default": {}
                }
            },
            "additionalProperties": false,
            "default": {}
        },
        "css": {
            "type": "object",
            "properties": {
                "input": {
                    "$ref": "definitions.json#/definitions/input",
                    "default": ""
                },
                "options": {
                    "$ref": "definitions.json#/definitions/css_options",
                    "additionalProperties": false,
                    "default": {}
                }
            },
            "additionalProperties": false,
            "default": {}
        },
        "input": {
            "type": "string",
            "format": "uri-reference",
            "default": ""
        },
        "js_options": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "referrerpolicy": {
                    "type": "string"
                },
                "crossorigin": {
                    "type": "string"
                },
                "integrity": {
                    "type": "string"
                },
                "pathname": {
                    "type": "string"
                },
                "nomodule": {
                    "type": "boolean"
                },
                "prefix": {
                    "type": "boolean"
                },
                "async": {
                    "type": "boolean"
                },
                "defer": {
                    "type": "boolean"
                },
                "type": {
                    "type": "string"
                }
            },
            "default": {}
        },
        "css_options": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "referrerpolicy": {
                    "type": "string"
                },
                "crossorigin": {
                    "type": "string"
                },
                "integrity": {
                    "type": "string"
                },
                "pathname": {
                    "type": "string"
                },
                "nomodule": {
                    "type": "boolean"
                },
                "prefix": {
                    "type": "boolean"
                },
                "async": {
                    "type": "boolean"
                },
                "defer": {
                    "type": "boolean"
                },
                "type": {
                    "type": "string"
                }
            },
            "default": {}
        },
        "import-map": {
            "type": "array",
            "items": {
                "type": "string",
                "minLength": 7,
                "pattern": "^https?://[a-zA-Z0-9-_./]+(:[0-9]+)?"
            },
            "default": []
        }
    }
}
