{ "$id":                  "https://schemas.mpai.community/TFA/V1.5/data/CurrencyQualifier.json",
  "$schema":              "https://json-schema.org/draft/2020-12/schema",

  "title":                "Currency Qualifier V1.5",
  "description":          "Currency categories, formats, and implementation-defined attributes.",
  "type":                 "object",
  "required":             [ "Header", "CurrencyQualifierID", "SubType", "Format" ],
  "additionalProperties": false,
  "properties":           {

    "Header":             { "type": "string", "pattern": "^TFA-CRQ-V[0-9],{1,2},[.][0-9],{1,2}$" },

    "CurrencyQualifierID":{ "type": "string" },

    "SubType":            { "type": "object", "additionalProperties": false, "properties": {
      "Categories":       { "type": "array", "items": { "type": "string", "enum": [ "Real", "Virtual" ] },
                          "minItems": 1, "uniqueItems": true } } },

    "Format":             { "type": "object", "additionalProperties": false, "properties": {
      "RealCurrency":     { "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/RealCurrencies.json" },
      "VirtualCurrency":  { "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/VirtualCurrencies.json" } } },

    "Attributes":         { "type": "object", "additionalProperties": true },

    "DescrMetadata":      { "type": "string", "maxLength": 2048 } } }
