Skip to main content
Schema to validate custom script component

Properties

  • external (array of object (min: , max: 5))
  • script (string)

Used in Categories

This component is used in the following categories:

Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Custom Script Component",
  "description": "Schema to validate custom script component",
  "type": "object",
  "required": [],
  "additionalProperties": false,
  "properties": {
    "external": {
      "type": "array",
      "additionalProperties": false,
      "maxItems": 5,
      "$comment": "Allows 5 external links",
      "items": {
        "type": "object",
        "required": [
          "url"
        ],
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "(https?://.*\\.(js))$"
          }
        }
      }
    },
    "script": {
      "type": "string"
    }
  }
}