{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "projectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "project ID from create/list."
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Previously read revision; mismatches reject concurrent updates."
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "description": "reason; see schema."
    },
    "definition": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "family": {
          "type": "string",
          "enum": [
            "organizational",
            "subtype",
            "semantic"
          ]
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "color": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^#[a-fA-F0-9]{6}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "order": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000
        },
        "retired": {
          "type": "boolean"
        },
        "parentId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "taxonomyVersion": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "definition": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000
        },
        "inclusions": {
          "minItems": 1,
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "exclusions": {
          "minItems": 1,
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "positiveExamples": {
          "minItems": 1,
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "negativeExamples": {
          "minItems": 1,
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "insufficientEvidence": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500
        }
      },
      "required": [
        "id",
        "family",
        "name"
      ],
      "additionalProperties": false,
      "description": "definition; see schema."
    }
  },
  "required": [
    "projectId",
    "expectedRevision",
    "reason",
    "definition"
  ],
  "additionalProperties": false
}
