{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.1/fabrication/joint.schema.json",
  "title": "Joint",
  "description": "A structural joint: the plates, bolts and welds where members meet (fabrication profile).",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[^/]+$"
    },
    "kind": {
      "type": "string",
      "enum": [
        "basePlate",
        "capPlate",
        "endPlate",
        "finPlate",
        "stiffeners"
      ]
    },
    "name": {
      "type": "string",
      "maxLength": 120
    },
    "mainId": {
      "type": "string",
      "minLength": 1
    },
    "otherId": {
      "type": "string",
      "minLength": 1
    },
    "at": {
      "type": "string",
      "enum": [
        "start",
        "end"
      ]
    },
    "along": {
      "type": "number",
      "minimum": 0,
      "maximum": 100000
    },
    "params": {
      "type": "object",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "string",
            "maxLength": 80
          },
          {
            "type": "boolean"
          }
        ]
      },
      "default": {}
    },
    "partIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "maxItems": 500,
      "default": []
    },
    "memberJoins": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "memberId": {
            "type": "string",
            "minLength": 1
          },
          "joinId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "memberId",
          "joinId"
        ],
        "x-eik-closed": true
      },
      "maxItems": 20
    },
    "revision": {
      "type": "integer",
      "minimum": 0,
      "default": 0
    }
  },
  "required": [
    "id",
    "kind",
    "mainId"
  ],
  "x-eik-closed": true
}
