{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/next/context/currency.schema.json",
  "type": "object",
  "title": "Currency",
  "description": "A context representing an individual Currency.",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "type": {
          "const": "fdc3.currency"
        },
        "name": {
          "type": "string",
          "title": "Currency name",
          "description": "The name of the currency for display purposes"
        },
        "id": {
          "type": "object",
          "properties": {
            "CURRENCY_ISOCODE": {
              "type": "string",
              "pattern": "^[A-Z]{3}$",
              "title": "CURRENCY_ISOCODE",
              "description": "The `CURRENCY_ISOCODE` should conform to 3 character alphabetic codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html)"
            }
          }
        }
      },
      "required": [
        "id"
      ]
    },
    { "$ref": "context.schema.json#/definitions/BaseContext" }
  ],
  "examples": [
    {
      "type": "fdc3.currency",
      "name": "US Dollar",
      "id": {
        "CURRENCY_ISOCODE": "USD"
      }
    }
  ]
}