{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Event source template",
  "type": "object",
  "description": "Action target templates.",
  "properties": {
    "id": {
      "description": "Unique identifier given by the server",
      "type": "integer"
    },
    "name": {
      "description": "A name to identify the action target template",
      "type": "string"
    },
    "public": {
      "description": "Make the action target template available to everybody.",
      "type": "boolean"
    },
    "organizationId": {
      "description": "The organization that offer the action target template.",
      "type": "integer"
    },
    "configuration": {
      "description": "Providing a schema aims to help the WUI for configuration.",
      "type": "object",
      "properties": {
        "schema": {
          "description": "A valid JSON Schema.",
          "type": "object"
        },
        "url": {
          "description": "The configuration URL.",
          "type": "string"
        },
        "token": {
          "description": "JSON Web Token to be authenticated when contacting the configuration URL.",
          "type": "string"
        }
      },
      "required": [
        "schema",
        "url"
      ]
    },
    "configurationUi": {
      "description": "Provide the configuration for the dynamic UI.",
      "type": "object",
      "properties": {
        "schemaForm": {
          "description": "Valid form schema accordingly to: http://schemaform.io",
          "type": "array"
        }
      }
    },
    "target": {
      "description": "The target configuration.",
      "type": "object",
      "properties": {
        "url": {
          "description": "The action target URL.",
          "type": "string"
        },
        "token": {
          "description": "JSON Web Token to be authenticated when contacting the action target URL.",
          "type": "string"
        }
      },
      "required": [
        "url"
      ]
    }
  },
  "required": [
    "id",
    "key",
    "name",
    "public",
    "organizationId",
    "target"
  ]
}