{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/warriorsfund-org/json-schema/warriorsfund-org-search-response-schema.json",
  "title": "SearchResponse",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/warriorsfund-org-openapi.yml#/components/schemas/SearchResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "count": {
      "type": "integer",
      "description": "Resources returned in this page"
    },
    "total_within_radius": {
      "type": "integer",
      "description": "Total matching resources within the radius before paging"
    },
    "has_more": {
      "type": "boolean",
      "description": "True if more pages remain"
    },
    "next_offset": {
      "type": [
        "integer",
        "null"
      ],
      "description": "offset to pass for the next page, or null when exhausted"
    },
    "zip": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "state_name": {
      "type": "string"
    },
    "county": {
      "type": "string"
    },
    "population": {
      "type": "integer"
    },
    "veteran_percentage": {
      "type": "number"
    },
    "radius": {
      "type": "integer"
    },
    "resources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Resource"
      }
    }
  },
  "$defs": {
    "Resource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "resource_type": {
          "type": "string",
          "enum": [
            "va_hospital",
            "va_clinic",
            "vet_center",
            "benefits_office",
            "mental_health",
            "housing",
            "employment",
            "vso",
            "other"
          ]
        },
        "address": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        },
        "lat": {
          "type": "number"
        },
        "lng": {
          "type": "number"
        },
        "phone": {
          "type": "string"
        },
        "website": {
          "type": "string"
        },
        "services": {
          "nullable": true,
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "string"
            }
          ],
          "description": "Services listed in the source record; parsed arrays where available, otherwise legacy text. Confirm with the provider."
        },
        "distance": {
          "type": "string",
          "description": "Distance in miles from search location"
        },
        "data_source": {
          "type": "string"
        },
        "verified_date": {
          "type": [
            "string",
            "null"
          ],
          "description": "Stored check date; not proof of current service availability or verification of every field"
        },
        "canonical_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Canonical directory HTML URL for citation; the publisher is Wounded Warriors, EIN 86-1336741"
        },
        "api_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Machine-readable directory record endpoint"
        },
        "provenance": {
          "type": "object",
          "description": "Stored source/date/contact/geocode fields with qualified meaning",
          "properties": {
            "source_label": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "provider_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "recorded_verification_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "record_updated_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "phone_status": {
              "type": "string"
            },
            "website_status": {
              "type": "string"
            },
            "geocode_source": {
              "type": [
                "string",
                "null"
              ]
            },
            "location_precision": {
              "type": "string",
              "enum": [
                "approximate",
                "not_confirmed"
              ]
            },
            "note": {
              "type": "string"
            }
          }
        },
        "availability": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "not_confirmed"
              ]
            },
            "note": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}