{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Event source template",
  "type": "object",
  "description": "Event source templates.",
  "properties": {
    "id": {
      "description": "Unique identifier given by the server",
      "type": "integer"
    },
    "key": {
      "description": "Unique key generated by the server to be used in events.",
      "type": "string"
    },
    "name": {
      "description": "A name to identify the event source template",
      "type": "string"
    },
    "public": {
      "description": "Make the event source template available to everybody.",
      "type": "boolean"
    },
    "organizationId": {
      "description": "The organization that offer the event source 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"
        }
      }
    }
  },
  "required": [
    "id",
    "key",
    "name",
    "public",
    "organizationId"
  ]
}