{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "jsonrpc": {
      "const": "2.0"
    },
    "method": {
      "const": "sxplr.updateLayers"
    },
    "params": {
      "properties": {
        "layers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AddableLayer"
          }
        }
      },
      "type": "object"
    }
  },
  "definitions": {
    "len4num": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "minItems": 4,
      "maxItems": 4
    },
    "AddableLayer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "clType": {
          "const": "customlayer/nglayer"
        },
        "source": {
          "type": "string"
        },
        "shader": {
          "type": "string"
        },
        "transform": {
          "type": "array",
          "minItems": 4,
          "maxItems": 4,
          "items": {
            "$ref": "#/definitions/len4num"
          }
        }
      }
    }
  }
}