{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract": {
      "type": "string",
      "const": "ConceptDefinition"
    },
    "conceptId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "ownerRepo": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "displayName": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string"
    },
    "schemaRef": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "ontologyId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "capabilityIds": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    "commandNames": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    },
    "relationships": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "targetConceptId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "cardinality": {
            "type": "string",
            "enum": [
              "one",
              "optional",
              "many"
            ]
          }
        },
        "required": [
          "kind",
          "targetConceptId",
          "cardinality"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "contract",
    "conceptId",
    "ownerRepo",
    "displayName",
    "schemaRef",
    "capabilityIds",
    "commandNames",
    "relationships"
  ],
  "additionalProperties": false,
  "$id": "https://schemas.infmonkeys.com/contracts/concept-definition.schema.json",
  "title": "concept-definition"
}
