{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citeladder-com/json-schema/citeladder-com-competitor-schema.json",
  "title": "Competitor",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citeladder-com-competitor-suggestions-api-openapi.yml#/components/schemas/Competitor",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "name": {
      "type": "string"
    },
    "aliases": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "logo_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "matching": {
      "$ref": "#/$defs/EntityMatching"
    }
  },
  "required": [
    "id",
    "name",
    "aliases",
    "domains"
  ],
  "additionalProperties": false,
  "$defs": {
    "EntityMatching": {
      "type": "object",
      "properties": {
        "mode": {
          "$ref": "#/$defs/EntityMatchingMode"
        },
        "context_terms": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "exclusion_phrases": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "common_word": {
          "default": false,
          "type": "boolean"
        }
      },
      "required": [
        "mode",
        "context_terms",
        "exclusion_phrases",
        "common_word"
      ],
      "additionalProperties": false
    },
    "EntityMatchingMode": {
      "type": "string",
      "enum": [
        "always",
        "context_required"
      ]
    }
  }
}