{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/next/context/contactList.schema.json",
  "type": "object",
  "title": "ContactList",
  "description": "A collection of contacts, e.g. for chatting to or calling multiple contacts.\n\nThe contact list schema does not explicitly include identifiers in the `id` section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "const": "fdc3.contactList"
        },
        "id": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "title": "Contact List Identifiers",
          "description": "One or more identifiers that refer to the contact list in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "An optional human-readable summary of the contact list"
        },
        "contacts": {
          "type": "array",
          "title": "List of Contacts",
          "description": "An array of contact contexts that forms the list.",
          "items": {
            "$ref": "contact.schema.json#"
          }
        }
      },
      "required": [
        "contacts"
      ]
    },
    { "$ref": "context.schema.json#/definitions/BaseContext" }
  ],
  "examples": [
    {
      "type": "fdc3.contactList",
      "contacts": [
        {
          "type": "fdc3.contact",
          "name": "Jane Doe",
          "id": {
            "email": "jane.doe@mail.com"
          }
        },
        {
          "type": "fdc3.contact",
          "name": "John Doe",
          "id": {
            "email": "john.doe@mail.com"
          }
        }
      ]
    }
  ]
}
