{ "title": "Geometry", "description": "One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json", "type": "object", "required": [ "type", "coordinates" ], "allOf": [ { "$ref": "#/definitions/Geometry" } ], "definitions": { "position": { "description": "A single position", "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "number" }, "additionalProperties": false }, "positionArray": { "description": "An array of positions", "type": "array", "items": { "$ref": "#/definitions/position" } }, "lineString": { "description": "An array of two or more positions", "allOf": [ { "$ref": "#/definitions/positionArray" }, { "minItems": 2 } ] }, "linearRing": { "description": "An array of four positions where the first equals the last", "allOf": [ { "$ref": "#/definitions/positionArray" }, { "minItems": 4 } ] }, "polygon": { "description": "An array of linear rings", "type": "array", "items": { "$ref": "#/definitions/linearRing" } }, "Point": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "Point" ] }, "coordinates": { "$ref": "#/definitions/position" } } }, "MultiPoint": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "MultiPoint" ] }, "coordinates": { "$ref": "#/definitions/positionArray" } } }, "Polygon": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "Polygon" ] }, "coordinates": { "$ref": "#/definitions/polygon" } } }, "LineString": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "LineString" ] }, "coordinates": { "$ref": "#/definitions/lineString" } } }, "MultiLineString": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "MultiLineString" ] }, "coordinates": { "type": "array", "items": { "$ref": "#/definitions/lineString" } } } }, "MultiPolygon": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "MultiPolygon" ] }, "coordinates": { "type": "array", "items": { "$ref": "#/definitions/polygon" } } } }, "Geometry": { "description": " Avalid GeoJSON geometry object", "oneOf": [ { "$ref": "#/definitions/Point" }, { "$ref": "#/definitions/MultiPoint" }, { "$ref": "#/definitions/Polygon" }, { "$ref": "#/definitions/LineString" }, { "$ref": "#/definitions/MultiLineString" }, { "$ref": "#/definitions/MultiPolygon" } ] } } }