{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/2.1/context/context.schema.json",
  "type": "object",
  "title": "Context",
  "description": "The `fdc3.context` type defines the basic contract or \"shape\" for all data exchanged by FDC3 operations. As such, it is not really meant to be used on its own, but is imported by more specific type definitions (standardized or custom) to provide the structure and properties shared by all FDC3 context data types.\n\nThe key element of FDC3 context types is their mandatory `type` property, which is used to identify what type of data the object represents, and what shape it has.\n\nThe FDC3 context type, and all derived types, define the minimum set of fields a context data object of a particular type can be expected to have, but this can always be extended with custom fields as appropriate.",
  "allOf": [
    {
      "$ref": "#/definitions/DocumentedContext"
    },
    {
      "$ref": "#/definitions/BaseContext"
    }
  ],
  "definitions": {
    "BaseContext": {
      "$comment": "Base definition for the Context object without documentation (which will be imported into all derived types unless separated).",
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "id": {
          "type": "object",
          "unevaluatedProperties": {
            "type": "string"
          }
        }
      },
      "additionalProperties": true,
      "required": [
        "type"
      ]
    },
    "DocumentedContext": {
      "$comment": "Base definition for the Context object without documentation (which will be imported into all derived types unless separated).",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "title": "Type",
          "description": "The type property is the only _required_ part of the FDC3 context data schema. The FDC3 [API](https://fdc3.finos.org/docs/api/spec) relies on the `type` property being present to route shared context data appropriately.\n\nFDC3 [Intents](https://fdc3.finos.org/docs/intents/spec) also register the context data types they support in an FDC3 [App Directory](https://fdc3.finos.org/docs/app-directory/overview), used for intent discovery and routing.\n\nStandardized FDC3 context types have well-known `type` properties prefixed with the `fdc3` namespace, e.g. `fdc3.instrument`. For non-standard types, e.g. those defined and used by a particular organization, the convention is to prefix them with an organization-specific namespace, e.g. `blackrock.fund`.\n\nSee the [Context Data Specification](https://fdc3.finos.org/docs/context/spec) for more information about context data types."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Context data objects may include a name property that can be used for more information, or display purposes. Some derived types may require the name object as mandatory, depending on use case."
        },
        "id": {
          "type": "object",
          "title": "Id",
          "description": "Context data objects may include a set of equivalent key-value pairs that can be used to help applications identify and look up the context type they receive in their own domain. The idea behind this design is that applications can provide as many equivalent identifiers to a target application as possible, e.g. an instrument may be represented by an ISIN, CUSIP or Bloomberg identifier.\n\nIdentifiers do not make sense for all types of data, so the `id` property is therefore optional, but some derived types may choose to require at least one identifier.",
          "unevaluatedProperties": {
            "type": "string"
          }
        }
      },
      "additionalProperties": true,
      "required": [
        "type"
      ]
    }
  }
}