{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "CAMP Integration Maintenance",
  "description": "What CAMP does about the integration in this folder. The same file every resource has, with the one setting only an integration needs: which signal adapter turns its signals into items.",
  "type": "object",
  "required": [
    "version"
  ],
  "properties": {
    "version": {
      "type": "integer",
      "const": 1,
      "description": "The shape of this file. CAMP writes 1 and reads nothing else yet."
    },
    "disabled": {
      "description": "Pauses maintenance. CAMP fetches, plans and offers nothing for the integration while this is set, and forgets nothing about it: the folder, this file and any mapping stay. Either true, or why, by and since. Remove the key to resume.",
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "object",
          "description": "The pause spelled out, as CAMP writes it from the menu.",
          "additionalProperties": false,
          "properties": {
            "why": {
              "type": "string",
              "description": "The reason, for whoever finds it paused."
            },
            "by": {
              "type": "string",
              "description": "Who paused it, as git names them."
            },
            "since": {
              "type": "string",
              "format": "date",
              "description": "The day it was paused."
            }
          }
        }
      ]
    },
    "comment": {
      "type": "string",
      "description": "A note to the next operator - why this is here, or why it is paused. Never sent anywhere."
    },
    "adapter": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._-]+(/[A-Za-z0-9._-]+)*$",
      "description": "The signal adapter to use, as a path under the adapters folder beside assets/. Leave it out to use the integration's own slug, which is what lets many organizations share one adapter. Set it when the slug is not unique enough - several organizations have an integration called \"ignition\" and each needs its own. The path must stay inside the adapters folder; CAMP refuses one that does not."
    }
  },
  "additionalProperties": false
}
