{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/geoapify/json-schema/geoapify-geo-json-input-schema.json",
  "title": "GeoJsonInput",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/geoapify-geometry-api-openapi.yml#/components/schemas/GeoJsonInput",
  "oneOf": [
    {
      "$ref": "#/$defs/FeatureCollection"
    },
    {
      "$ref": "#/$defs/Feature"
    },
    {
      "$ref": "#/$defs/GenericGeometry"
    },
    {
      "$ref": "#/$defs/PointGeometry"
    }
  ],
  "$defs": {
    "Feature": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "type",
        "properties",
        "geometry"
      ],
      "properties": {
        "type": {
          "const": "Feature"
        },
        "properties": {
          "$ref": "#/$defs/GeometryProperties"
        },
        "geometry": {
          "oneOf": [
            {
              "$ref": "#/$defs/PointGeometry"
            },
            {
              "$ref": "#/$defs/GenericGeometry"
            },
            {
              "$ref": "#/$defs/GeometryCollection"
            }
          ]
        },
        "bbox": {
          "type": "array",
          "minItems": 4,
          "maxItems": 6,
          "items": {
            "type": "number"
          }
        }
      }
    },
    "FeatureCollection": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "type",
        "features"
      ],
      "properties": {
        "type": {
          "const": "FeatureCollection"
        },
        "features": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Feature"
          }
        }
      }
    },
    "GenericGeometry": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "LineString",
            "Polygon",
            "MultiPoint",
            "MultiLineString",
            "MultiPolygon"
          ]
        },
        "coordinates": {
          "type": "array"
        }
      }
    },
    "GeometryCollection": {
      "type": "object",
      "required": [
        "type",
        "geometries"
      ],
      "properties": {
        "type": {
          "const": "GeometryCollection"
        },
        "geometries": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/PointGeometry"
              },
              {
                "$ref": "#/$defs/GenericGeometry"
              },
              {
                "$ref": "#/$defs/GeometryCollection"
              }
            ]
          }
        }
      }
    },
    "GeometryProperties": {
      "type": "object",
      "additionalProperties": true
    },
    "PointGeometry": {
      "type": "object",
      "required": [
        "type",
        "coordinates"
      ],
      "properties": {
        "type": {
          "const": "Point"
        },
        "coordinates": {
          "$ref": "#/$defs/Position"
        }
      }
    },
    "Position": {
      "type": "array",
      "minItems": 2,
      "maxItems": 3,
      "prefixItems": [
        {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        {
          "type": "number"
        }
      ],
      "items": false
    }
  }
}