{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wagevitals-com/json-schema/wagevitals-com-california-programs-schema.json",
  "title": "CaliforniaPrograms",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wagevitals-com-openapi.json#/components/schemas/CaliforniaPrograms",
  "type": "object",
  "required": [
    "meta",
    "source",
    "counties",
    "locations",
    "online_providers"
  ],
  "properties": {
    "meta": {
      "$ref": "#/$defs/Meta"
    },
    "source": {
      "type": "object",
      "properties": {
        "publisher": {
          "type": "string"
        },
        "landing_page": {
          "type": "string",
          "format": "uri"
        },
        "lists": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "list": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "page_last_updated": {
                "type": "string",
                "format": "date"
              },
              "rows": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        },
        "downloaded": {
          "type": "string",
          "format": "date"
        },
        "checked": {
          "type": "string",
          "format": "date"
        },
        "not_in_source": {
          "type": "string"
        }
      }
    },
    "note": {
      "type": "string"
    },
    "counties": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "locations": {
            "type": "integer",
            "minimum": 0
          },
          "facility_based": {
            "type": "integer",
            "minimum": 0,
            "description": "Locations of the facility-based CDPH list; 0 when the county has none (machine data, not shown as a zero on the pages)."
          },
          "online_providers_with_clinical_sites": {
            "type": "integer",
            "minimum": 0,
            "description": "Online-theory providers whose clinical sites CDPH lists in this county; 0 when none."
          },
          "page": {
            "oneOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    },
    "locations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "address",
          "city",
          "county"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "county": {
            "type": "string"
          },
          "zip_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "phones": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facility_based": {
            "type": "boolean"
          }
        }
      }
    },
    "online_providers": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "clinical_counties"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "provider_type": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "phones": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "clinical_counties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "clinical_cities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "$defs": {
    "Meta": {
      "type": "object",
      "required": [
        "title",
        "schema_version",
        "self",
        "data_checked",
        "reuse"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "schema_version": {
          "type": "string"
        },
        "self": {
          "type": "string",
          "format": "uri"
        },
        "page": {
          "oneOf": [
            {
              "type": "string",
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "data_checked": {
          "type": "string",
          "format": "date"
        },
        "method": {
          "type": "string",
          "format": "uri"
        },
        "reuse": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}