{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/morvs-ai/json-schema/morvs-ai-recent-fda-recalls-schema.json",
  "title": "RecentFdaRecalls",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/morvs-ai-openapi.json#/components/schemas/RecentFdaRecalls",
  "type": "object",
  "required": [
    "window_days",
    "filters",
    "count",
    "recalls"
  ],
  "properties": {
    "window_days": {
      "type": "integer",
      "description": "Lookback applied to recall_initiation_date, not report_date."
    },
    "filters": {
      "type": "object",
      "required": [
        "product",
        "class",
        "firm",
        "status"
      ],
      "properties": {
        "product": {
          "type": [
            "string",
            "null"
          ]
        },
        "class": {
          "type": [
            "string",
            "null"
          ]
        },
        "firm": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "count": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of rows returned, not all matching recalls."
    },
    "recalls": {
      "type": "array",
      "maxItems": 500,
      "items": {
        "type": "object",
        "required": [
          "recall_number",
          "product_type",
          "status",
          "classification",
          "recall_initiation_date",
          "report_date",
          "recalling_firm",
          "product_description",
          "reason_for_recall",
          "city",
          "state",
          "country"
        ],
        "properties": {
          "recall_number": {
            "type": "string"
          },
          "product_type": {
            "type": "string",
            "enum": [
              "drug",
              "device",
              "food",
              "other"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "classification": {
            "type": [
              "string",
              "null"
            ]
          },
          "recall_initiation_date": {
            "type": "string",
            "format": "date"
          },
          "report_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "recalling_firm": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason_for_recall": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}