{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "classification": {
      "enum": ["MyCode", "LibraryCode", "UnrelatedCode"]
    },
    "includes": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "id": "https://json.schemastore.org/mycode.json",
  "properties": {
    "Eval": {
      "description": "Script that is executed by passing a string to the host-provided eval function.",
      "default": "MyCode",
      "allOf": [
        {
          "$ref": "#/definitions/classification"
        }
      ]
    },
    "Function": {
      "description": "Script that is executed by passing a string to the 'Function' constructor.",
      "default": "LibraryCode",
      "allOf": [
        {
          "$ref": "#/definitions/classification"
        }
      ]
    },
    "ScriptBlock": {
      "description": "Script that is executed by passing a string to the 'setTimeout', 'setImmediate', or 'setInterval' functions.",
      "default": "UnrelatedCode",
      "allOf": [
        {
          "$ref": "#/definitions/classification"
        }
      ]
    },
    "MyCode": {
      "description": "An array of urls or files that are classified as 'MyCode'.",
      "allOf": [
        {
          "$ref": "#/definitions/includes"
        }
      ]
    },
    "Libraries": {
      "description": "An array of urls or files that are classified as 'LibraryCode'.",
      "allOf": [
        {
          "$ref": "#/definitions/includes"
        }
      ]
    },
    "Unrelated": {
      "description": "An array of urls or files that are classified as 'UnrelatedCode'.",
      "allOf": [
        {
          "$ref": "#/definitions/includes"
        }
      ]
    }
  },
  "title": "JSON schema for mycode.js files",
  "type": "object"
}
