{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://copyglyph.dev/api/schema.json",
  "title": "CopyGlyph symbol",
  "description": "One Unicode character as served by the CopyGlyph API. Licensed CC BY 4.0.",
  "type": "object",
  "required": [
    "char",
    "codePoint",
    "unicode",
    "slug",
    "name",
    "categories",
    "keywords",
    "htmlEntityDecimal",
    "htmlEntityHex",
    "css",
    "jsEscape",
    "utf8Bytes",
    "indexTier",
    "url"
  ],
  "additionalProperties": false,
  "properties": {
    "char": {
      "type": "string",
      "description": "The character itself."
    },
    "codePoint": {
      "type": "integer",
      "minimum": 0,
      "description": "Decimal Unicode code point."
    },
    "unicode": {
      "type": "string",
      "pattern": "^U\\+[0-9A-F]{4,6}$"
    },
    "slug": {
      "type": "string",
      "pattern": "^u[0-9a-f]{4,6}$"
    },
    "name": {
      "type": "string"
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "altCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "Windows alt code, null when none is documented."
    },
    "htmlEntityNamed": {
      "type": [
        "string",
        "null"
      ]
    },
    "htmlEntityDecimal": {
      "type": "string"
    },
    "htmlEntityHex": {
      "type": "string"
    },
    "css": {
      "type": "string",
      "description": "CSS content escape."
    },
    "jsEscape": {
      "type": "string"
    },
    "utf8Bytes": {
      "type": "string"
    },
    "indexTier": {
      "type": "string",
      "enum": [
        "A",
        "B",
        "C"
      ],
      "description": "Index decision for the character's own page. C means the page was withdrawn and url points at the category hub."
    },
    "url": {
      "type": "string",
      "format": "uri"
    }
  }
}