{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buckybuild-com/json-schema/buckybuild-com-create-feasibility-analysis-schema.json",
  "title": "CreateFeasibilityAnalysis",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buckybuild-com-openapi.json#/components/schemas/CreateFeasibilityAnalysis",
  "type": "object",
  "properties": {
    "siteId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "location": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "address"
            },
            "address": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "countryBias": {
              "type": "string",
              "enum": [
                "CA",
                "DE",
                "US"
              ]
            }
          },
          "required": [
            "type",
            "address"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "coordinates"
            },
            "lat": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            },
            "lng": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            },
            "address": {
              "type": "string",
              "maxLength": 500
            }
          },
          "required": [
            "type",
            "lat",
            "lng"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "lot"
            },
            "lotId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "required": [
            "type",
            "lotId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "geoDivisionId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "externalId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "externalIdType": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "type": {
              "type": "string",
              "const": "parcel"
            }
          },
          "required": [
            "geoDivisionId",
            "externalId",
            "type"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "geometry"
            },
            "geometry": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "Polygon",
                    "MultiPolygon"
                  ]
                },
                "coordinates": {}
              },
              "required": [
                "type",
                "coordinates"
              ]
            }
          },
          "required": [
            "type",
            "geometry"
          ]
        }
      ]
    },
    "scenario": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "requestedModules": {
      "default": [
        "site",
        "zoning",
        "envelope",
        "uses",
        "coverage",
        "sources"
      ],
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "parcels": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "lotId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "role": {
            "default": "build",
            "type": "string",
            "enum": [
              "build",
              "access",
              "parking",
              "stormwater",
              "open_space",
              "utility",
              "easement",
              "context",
              "excluded"
            ]
          }
        },
        "required": [
          "lotId"
        ]
      }
    },
    "projectId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "includeSourceContent": {
      "default": false,
      "type": "boolean"
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "mode": {
      "default": "full",
      "type": "string",
      "enum": [
        "full",
        "facts"
      ]
    }
  }
}