{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/MonetaryAmount",
  "title": "MonetaryAmount",
  "type": "object",
  "required": [
    "value",
    "currency"
  ],
  "properties": {
    "value": {
      "type": "number",
      "format": "double",
      "description": "The monetary value"
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$",
      "description": "ISO 4217 currency code"
    }
  }
}