{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Ingredient",
  "title": "Ingredient",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the ingredient."
    },
    "display_text": {
      "type": "string",
      "description": "Custom display text for the ingredient on the recipe page."
    },
    "product_ids": {
      "type": "array",
      "description": "Instacart product identifiers to match specific products.",
      "items": {
        "type": "string"
      }
    },
    "upcs": {
      "type": "array",
      "description": "Universal Product Codes to match specific products.",
      "items": {
        "type": "string"
      }
    },
    "measurements": {
      "type": "object",
      "description": "Measurement details for the ingredient.",
      "properties": {
        "amount": {
          "type": "number",
          "description": "The measurement amount."
        },
        "unit": {
          "type": "string",
          "description": "The measurement unit."
        }
      }
    },
    "filters": {
      "type": "object",
      "description": "Filters to narrow product matching for this ingredient.",
      "properties": {
        "department": {
          "type": "string",
          "description": "The store department to filter products by."
        }
      }
    }
  }
}