{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.4/project/dimension-style.schema.json",
  "title": "Dimension style",
  "description": "A dimension style (documentation profile).",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "revision": {
      "type": "integer",
      "minimum": 0
    },
    "tickMark": {
      "type": "string",
      "enum": [
        "diagonal",
        "arrow",
        "dot",
        "none"
      ]
    },
    "tickSize": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 20
    },
    "lineWeight": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 3
    },
    "dimensionLineExtension": {
      "type": "number",
      "minimum": 0,
      "maximum": 20
    },
    "witnessLineControl": {
      "type": "string",
      "enum": [
        "gap",
        "fixed"
      ]
    },
    "witnessLineLength": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "witnessGap": {
      "type": "number",
      "minimum": 0,
      "maximum": 20
    },
    "witnessExtension": {
      "type": "number",
      "minimum": 0,
      "maximum": 20
    },
    "textSize": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 20
    },
    "textOffset": {
      "type": "number",
      "minimum": 0,
      "maximum": 20
    },
    "fontFamily": {
      "type": "string",
      "x-eik-application": true
    },
    "textBold": {
      "type": "boolean"
    },
    "textBackground": {
      "type": "string",
      "enum": [
        "opaque",
        "transparent"
      ]
    },
    "readConvention": {
      "type": "string",
      "enum": [
        "upThenLeft",
        "horizontal"
      ]
    },
    "decimals": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3
    },
    "unitSuffix": {
      "type": "string",
      "maxLength": 10
    },
    "color": {
      "type": "string",
      "pattern": "^#[0-9a-fA-F]{6}$"
    },
    "equalityText": {
      "type": "string",
      "minLength": 1,
      "maxLength": 10
    },
    "equalityWitnessDisplay": {
      "type": "string",
      "enum": [
        "tickAndLine",
        "tick",
        "line"
      ]
    },
    "classifications": {
      "$ref": "../classifications/classifications.schema.json"
    }
  },
  "required": [
    "id",
    "name",
    "revision",
    "tickMark",
    "tickSize",
    "lineWeight",
    "dimensionLineExtension",
    "witnessLineControl",
    "witnessLineLength",
    "witnessGap",
    "witnessExtension",
    "textSize",
    "textOffset",
    "fontFamily",
    "textBold",
    "textBackground",
    "readConvention",
    "decimals",
    "unitSuffix",
    "color",
    "equalityText",
    "equalityWitnessDisplay"
  ],
  "x-eik-closed": true
}
