{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://abcs.sirvisetti.com/schemas/capability.schema.json",
  "title": "ABCS Capability Definition",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "abcs",
    "id",
    "title",
    "domain",
    "resource",
    "operation",
    "summary"
  ],
  "properties": {
    "abcs": {
      "type": "string",
      "const": "0.1"
    },
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-[a-z0-9]+)*){2}$"
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "domain": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "resource": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "operation": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "summary": {
      "type": "string",
      "minLength": 1
    },
    "contracts": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "input": {"type": "string"},
        "output": {"type": "string"}
      }
    },
    "relationships": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {"type": "string"},
        "uniqueItems": true
      }
    }
  }
}
