{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/propraven-com/json-schema/propraven-com-parcel-zoning-schema.json",
  "title": "ParcelZoning",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/propraven-com-zoning-api-openapi.yml#/components/schemas/ParcelZoning",
  "type": "object",
  "required": [
    "parcel",
    "matched",
    "rawCode",
    "overlays",
    "attributes",
    "match"
  ],
  "properties": {
    "parcel": {
      "type": "object",
      "properties": {
        "stateFips": {
          "type": "string"
        },
        "countyFips": {
          "type": "string"
        },
        "parcelId": {
          "type": "string"
        }
      }
    },
    "matched": {
      "type": "boolean",
      "description": "False when the parcel's centroid fell in no published district (a measurement, not an error)."
    },
    "jurisdiction": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "jurisdictionId",
        "name",
        "type",
        "stateFips"
      ],
      "properties": {
        "jurisdictionId": {
          "type": "string",
          "description": "Registry id of the zoning body, e.g. `nc-37119-charlotte`."
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "city",
            "town",
            "village",
            "borough",
            "township",
            "county",
            "unincorporated",
            "consolidated",
            "special_district"
          ]
        },
        "stateFips": {
          "type": "string"
        },
        "placeFips": {
          "type": [
            "string",
            "null"
          ]
        },
        "countyFips": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "zoningHomeUrl": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "boundaryJurisdiction": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "jurisdictionId",
        "name",
        "type",
        "stateFips"
      ],
      "properties": {
        "jurisdictionId": {
          "type": "string",
          "description": "Registry id of the zoning body, e.g. `nc-37119-charlotte`."
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "city",
            "town",
            "village",
            "borough",
            "township",
            "county",
            "unincorporated",
            "consolidated",
            "special_district"
          ]
        },
        "stateFips": {
          "type": "string"
        },
        "placeFips": {
          "type": [
            "string",
            "null"
          ]
        },
        "countyFips": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "zoningHomeUrl": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "rawCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "THE FACT: the zoning code exactly as the issuing jurisdiction published it."
    },
    "baseCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "codeName": {
      "type": [
        "string",
        "null"
      ]
    },
    "overlays": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "restrictionSummary": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "splitZoned": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "altCodes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "zonedSince": {
      "type": [
        "string",
        "null"
      ]
    },
    "match": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "confidence": {
          "type": [
            "number",
            "null"
          ]
        },
        "overlaysAvailable": {
          "type": "boolean"
        }
      }
    },
    "attributes": {
      "$ref": "#/$defs/ZoningAttributes"
    },
    "attributesMatchedOn": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "raw_code",
        "base_code",
        null
      ]
    },
    "conditionalNote": {
      "type": [
        "string",
        "null"
      ]
    },
    "derivedFamily": {
      "type": "object",
      "properties": {
        "family": {
          "type": [
            "string",
            "null"
          ]
        },
        "method": {
          "type": "string"
        },
        "confidence": {
          "type": [
            "number",
            "null"
          ]
        },
        "unresolvedReason": {
          "type": "string"
        },
        "evidence": {
          "type": "string"
        }
      }
    },
    "provenance": {
      "type": "object",
      "properties": {
        "sourceUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "publisherRole": {
          "type": [
            "string",
            "null"
          ]
        },
        "harvestedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "epochVersion": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  },
  "$defs": {
    "ZoningAttributeCitation": {
      "type": "object",
      "required": [
        "verified"
      ],
      "properties": {
        "value": {
          "type": [
            "number",
            "boolean",
            "string",
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "qualifier": {
          "type": [
            "string",
            "null"
          ]
        },
        "section": {
          "type": [
            "string",
            "null"
          ],
          "description": "The ordinance's own label for the place, e.g. `Table 4-1`."
        },
        "quote": {
          "type": [
            "string",
            "null"
          ],
          "description": "Verbatim ordinance text, mechanically re-found in the authority's published text."
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Deep link to the section in the authority's text."
        },
        "confidence": {
          "type": [
            "number",
            "null"
          ]
        },
        "verified": {
          "type": "boolean",
          "description": "True when the quote was found exactly once in the text read. Only verified values reach the typed attribute fields."
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "ZoningAttributes": {
      "type": "object",
      "required": [
        "attributeSource",
        "citations"
      ],
      "description": "The parsed ordinance dictionary for the code. EVERY value may be null: null means the ordinance has not been parsed for this code, or the text read does not state the value (or its quote did not verify). Null is never zero or false.",
      "properties": {
        "minLotAreaSqft": {
          "type": [
            "number",
            "null"
          ]
        },
        "minLotWidthFt": {
          "type": [
            "number",
            "null"
          ]
        },
        "maxHeightFt": {
          "type": [
            "number",
            "null"
          ]
        },
        "maxStories": {
          "type": [
            "number",
            "null"
          ]
        },
        "maxFar": {
          "type": [
            "number",
            "null"
          ]
        },
        "maxDensityUnitsPerAcre": {
          "type": [
            "number",
            "null"
          ]
        },
        "maxLotCoveragePct": {
          "type": [
            "number",
            "null"
          ]
        },
        "setbackFrontFt": {
          "type": [
            "number",
            "null"
          ]
        },
        "setbackSideFt": {
          "type": [
            "number",
            "null"
          ]
        },
        "setbackRearFt": {
          "type": [
            "number",
            "null"
          ]
        },
        "minParkingPerUnit": {
          "type": [
            "number",
            "null"
          ]
        },
        "multifamilyByRight": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "duplexByRight": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "triplexQuadplexByRight": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "aduAllowed": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "shortTermRentalAllowed": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "maxUnitsByRight": {
          "type": [
            "number",
            "null"
          ]
        },
        "permittedUseFamilies": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "conditionalUseFamilies": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "citations": {
          "type": "object",
          "description": "Attribute name (e.g. `min_lot_area_sqft`) -> every record read for it, each with its section, verbatim quote and link.",
          "additionalProperties": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/ZoningAttributeCitation"
            }
          }
        },
        "ordinanceVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "attributeSource": {
          "type": "string",
          "enum": [
            "ordinance_text",
            "publisher_table",
            "manual",
            "none"
          ]
        },
        "sourceCitation": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "parsedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "reviewStatus": {
          "type": "string",
          "enum": [
            "unreviewed",
            "machine",
            "human_verified",
            "disputed"
          ]
        }
      }
    }
  }
}