{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.legal.party.schema.json",
  "title": "rig.legal.party",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "agreement": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "party": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "role": {
      "type": "string",
      "enum": [
        "party",
        "buyer",
        "seller",
        "lessor",
        "lessee",
        "employer",
        "employee",
        "licensor",
        "licensee",
        "witness",
        "guarantor"
      ]
    },
    "signedDate": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
      "description": "ISO 8601 calendar date."
    }
  },
  "required": [
    "agreement",
    "party"
  ],
  "description": "One side of an agreement. party is a person or organisation entity. A second signatory is another entity."
}
