From ac443e3b982c73ccd088faa9bc10e0741e105eb1 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 8 Sep 2025 23:30:28 +0530 Subject: [PATCH 1/5] updated database version , sdk version and docs example in openapi with spatial --- app/config/specs/open-api3-1.8.x-console.json | 24 +++++----- app/config/specs/open-api3-1.8.x-server.json | 24 +++++----- .../specs/open-api3-latest-console.json | 24 +++++----- app/config/specs/open-api3-latest-server.json | 24 +++++----- app/config/specs/swagger2-1.8.x-console.json | 24 +++++----- app/config/specs/swagger2-1.8.x-server.json | 24 +++++----- app/config/specs/swagger2-latest-console.json | 24 +++++----- app/config/specs/swagger2-latest-server.json | 24 +++++----- composer.lock | 48 +++++++++---------- .../Databases/Collections/Documents/XList.php | 5 ++ .../SDK/Specification/Format/OpenAPI3.php | 9 +++- .../SDK/Specification/Format/Swagger2.php | 9 +++- 12 files changed, 141 insertions(+), 122 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 53137becbb..2438cf3ff6 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -7860,7 +7860,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -7977,7 +7977,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -8094,7 +8094,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -8211,7 +8211,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -8328,7 +8328,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -8445,7 +8445,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -35364,7 +35364,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -35480,7 +35480,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -35596,7 +35596,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -35712,7 +35712,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -35828,7 +35828,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -35944,7 +35944,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index ee0b6f59ac..5882e797e7 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -7323,7 +7323,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -7441,7 +7441,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -7559,7 +7559,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -7677,7 +7677,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -7795,7 +7795,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -7913,7 +7913,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -25798,7 +25798,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -25915,7 +25915,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -26032,7 +26032,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -26149,7 +26149,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -26266,7 +26266,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -26383,7 +26383,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 53137becbb..2438cf3ff6 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -7860,7 +7860,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -7977,7 +7977,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -8094,7 +8094,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -8211,7 +8211,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -8328,7 +8328,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -8445,7 +8445,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -35364,7 +35364,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -35480,7 +35480,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -35596,7 +35596,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -35712,7 +35712,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -35828,7 +35828,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -35944,7 +35944,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index ee0b6f59ac..5882e797e7 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -7323,7 +7323,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -7441,7 +7441,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -7559,7 +7559,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -7677,7 +7677,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -7795,7 +7795,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -7913,7 +7913,7 @@ "default": { "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -25798,7 +25798,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -25915,7 +25915,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "items": { "oneOf": [ { @@ -26032,7 +26032,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -26149,7 +26149,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "items": { "oneOf": [ { @@ -26266,7 +26266,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { @@ -26383,7 +26383,7 @@ "default": { "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "items": { "oneOf": [ { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 393c2ce9c8..c91d6b824a 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -7998,7 +7998,7 @@ "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true } }, @@ -8104,7 +8104,7 @@ "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true }, "newKey": { @@ -8214,7 +8214,7 @@ "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true } }, @@ -8320,7 +8320,7 @@ "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true }, "newKey": { @@ -8430,7 +8430,7 @@ "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true } }, @@ -8536,7 +8536,7 @@ "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true }, "newKey": { @@ -35470,7 +35470,7 @@ "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true } }, @@ -35575,7 +35575,7 @@ "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true }, "newKey": { @@ -35684,7 +35684,7 @@ "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true } }, @@ -35789,7 +35789,7 @@ "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true }, "newKey": { @@ -35898,7 +35898,7 @@ "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true } }, @@ -36003,7 +36003,7 @@ "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true }, "newKey": { diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 812598f516..166a1f74e5 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -7451,7 +7451,7 @@ "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true } }, @@ -7558,7 +7558,7 @@ "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true }, "newKey": { @@ -7669,7 +7669,7 @@ "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true } }, @@ -7776,7 +7776,7 @@ "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true }, "newKey": { @@ -7887,7 +7887,7 @@ "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true } }, @@ -7994,7 +7994,7 @@ "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true }, "newKey": { @@ -25959,7 +25959,7 @@ "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true } }, @@ -26065,7 +26065,7 @@ "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true }, "newKey": { @@ -26175,7 +26175,7 @@ "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true } }, @@ -26281,7 +26281,7 @@ "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true }, "newKey": { @@ -26391,7 +26391,7 @@ "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true } }, @@ -26497,7 +26497,7 @@ "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true }, "newKey": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 393c2ce9c8..c91d6b824a 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -7998,7 +7998,7 @@ "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true } }, @@ -8104,7 +8104,7 @@ "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true }, "newKey": { @@ -8214,7 +8214,7 @@ "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true } }, @@ -8320,7 +8320,7 @@ "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true }, "newKey": { @@ -8430,7 +8430,7 @@ "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true } }, @@ -8536,7 +8536,7 @@ "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true }, "newKey": { @@ -35470,7 +35470,7 @@ "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true } }, @@ -35575,7 +35575,7 @@ "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true }, "newKey": { @@ -35684,7 +35684,7 @@ "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true } }, @@ -35789,7 +35789,7 @@ "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true }, "newKey": { @@ -35898,7 +35898,7 @@ "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true } }, @@ -36003,7 +36003,7 @@ "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true }, "newKey": { diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 812598f516..166a1f74e5 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -7451,7 +7451,7 @@ "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true } }, @@ -7558,7 +7558,7 @@ "type": "array", "description": "Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true }, "newKey": { @@ -7669,7 +7669,7 @@ "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true } }, @@ -7776,7 +7776,7 @@ "type": "array", "description": "Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true }, "newKey": { @@ -7887,7 +7887,7 @@ "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true } }, @@ -7994,7 +7994,7 @@ "type": "array", "description": "Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true }, "newKey": { @@ -25959,7 +25959,7 @@ "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true } }, @@ -26065,7 +26065,7 @@ "type": "array", "description": "Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], \u2026], listing the vertices of the line in order. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[1, 2], [3, 4], [5, 6]]", "x-nullable": true }, "newKey": { @@ -26175,7 +26175,7 @@ "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true } }, @@ -26281,7 +26281,7 @@ "type": "array", "description": "Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[1, 2]", "x-nullable": true }, "newKey": { @@ -26391,7 +26391,7 @@ "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true } }, @@ -26497,7 +26497,7 @@ "type": "array", "description": "Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], \u2026], \u2026], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.", "default": null, - "x-example": "[[1,2], [3, 4]]", + "x-example": "[[[1, 2], [3, 4], [5, 6], [1, 2]]]", "x-nullable": true }, "newKey": { diff --git a/composer.lock b/composer.lock index 1e422773e5..56a32fd753 100644 --- a/composer.lock +++ b/composer.lock @@ -3650,16 +3650,16 @@ }, { "name": "utopia-php/database", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "b5ea4d133a1a4e747b7522e61e072289129a06f4" + "reference": "f06a57ab95a86713013fa96919b354bda26f696c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/b5ea4d133a1a4e747b7522e61e072289129a06f4", - "reference": "b5ea4d133a1a4e747b7522e61e072289129a06f4", + "url": "https://api.github.com/repos/utopia-php/database/zipball/f06a57ab95a86713013fa96919b354bda26f696c", + "reference": "f06a57ab95a86713013fa96919b354bda26f696c", "shasum": "" }, "require": { @@ -3700,9 +3700,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.4.1" + "source": "https://github.com/utopia-php/database/tree/1.4.3" }, - "time": "2025-09-05T13:23:52+00:00" + "time": "2025-09-08T12:54:19+00:00" }, { "name": "utopia-php/detector", @@ -3954,16 +3954,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.24", + "version": "0.33.27", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "5112b1023342163e3fbedec99f38fc32c8700aa0" + "reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/5112b1023342163e3fbedec99f38fc32c8700aa0", - "reference": "5112b1023342163e3fbedec99f38fc32c8700aa0", + "url": "https://api.github.com/repos/utopia-php/http/zipball/d9d10a895e85c8c7675220347cc6109db9d3bd37", + "reference": "d9d10a895e85c8c7675220347cc6109db9d3bd37", "shasum": "" }, "require": { @@ -3995,9 +3995,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.24" + "source": "https://github.com/utopia-php/http/tree/0.33.27" }, - "time": "2025-09-04T04:18:39+00:00" + "time": "2025-09-07T18:40:53+00:00" }, { "name": "utopia-php/image", @@ -4639,16 +4639,16 @@ }, { "name": "utopia-php/swoole", - "version": "0.8.3", + "version": "0.8.4", "source": { "type": "git", "url": "https://github.com/utopia-php/swoole.git", - "reference": "1af73dd3e73987cf729c7db399054e4a70befd99" + "reference": "150c30700e738c52348cce9ed0e0f0ff96872081" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/swoole/zipball/1af73dd3e73987cf729c7db399054e4a70befd99", - "reference": "1af73dd3e73987cf729c7db399054e4a70befd99", + "url": "https://api.github.com/repos/utopia-php/swoole/zipball/150c30700e738c52348cce9ed0e0f0ff96872081", + "reference": "150c30700e738c52348cce9ed0e0f0ff96872081", "shasum": "" }, "require": { @@ -4684,9 +4684,9 @@ ], "support": { "issues": "https://github.com/utopia-php/swoole/issues", - "source": "https://github.com/utopia-php/swoole/tree/0.8.3" + "source": "https://github.com/utopia-php/swoole/tree/0.8.4" }, - "time": "2025-03-26T10:09:05+00:00" + "time": "2025-09-07T09:39:46+00:00" }, { "name": "utopia-php/system", @@ -5019,16 +5019,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.3.2", + "version": "1.3.4", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "375a6c9b168db6fdf58fbe0d49d2261d80700b4a" + "reference": "d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/375a6c9b168db6fdf58fbe0d49d2261d80700b4a", - "reference": "375a6c9b168db6fdf58fbe0d49d2261d80700b4a", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac", + "reference": "d3b420dced42f1eec1f6d0aa98b7bbf8de4042ac", "shasum": "" }, "require": { @@ -5064,9 +5064,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.3.2" + "source": "https://github.com/appwrite/sdk-generator/tree/1.3.4" }, - "time": "2025-09-05T15:50:35+00:00" + "time": "2025-09-08T11:56:04+00:00" }, { "name": "doctrine/annotations", diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 9c8405cf18..7dfa2a0222 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -13,6 +13,7 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; +use Utopia\Database\Exception as DatabaseException; use Utopia\Database\Exception\Order as OrderException; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; @@ -140,6 +141,10 @@ class XList extends Action } catch (QueryException $e) { throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } + // incase of querying distance in multidimenonsal geometry + catch (DatabaseException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } $operations = 0; $collectionsCache = []; diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 6432342e45..c9c2135ab3 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -9,8 +9,10 @@ use Appwrite\SDK\Response; use Appwrite\SDK\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; +use Utopia\Database\Database; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Validator\Spatial; use Utopia\Validator; use Utopia\Validator\ArrayList; use Utopia\Validator\Nullable; @@ -448,13 +450,18 @@ class OpenAPI3 extends Format ]; break; case 'Utopia\Database\Validator\Spatial': + /** @var Spatial $validator */ $node['schema']['type'] = 'array'; $node['schema']['items'] = [ 'oneOf' => [ ['type' => 'array'] ] ]; - $node['schema']['x-example'] = '[[1,2], [3, 4]]'; + $node['schema']['x-example'] = match ($validator->getSpatialType()) { + Database::VAR_POINT => '[1, 2]', + Database::VAR_LINESTRING => '[[1, 2], [3, 4], [5, 6]]', + Database::VAR_POLYGON => '[[[1, 2], [3, 4], [5, 6], [1, 2]]]', + }; break; case 'Appwrite\Utopia\Database\Validator\Queries\Columns': case 'Appwrite\Utopia\Database\Validator\Queries\Attributes': diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 8a84a3a398..a923f40ffa 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -9,8 +9,10 @@ use Appwrite\SDK\Response; use Appwrite\SDK\Specification\Format; use Appwrite\Template\Template; use Appwrite\Utopia\Response\Model; +use Utopia\Database\Database; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Validator\Spatial; use Utopia\Route; use Utopia\Validator; use Utopia\Validator\ArrayList; @@ -463,13 +465,18 @@ class Swagger2 extends Format ]; break; case 'Utopia\Database\Validator\Spatial': + /** @var Spatial $validator */ $node['type'] = 'array'; $node['schema']['items'] = [ 'oneOf' => [ ['type' => 'array'] ] ]; - $node['x-example'] = '[[1,2], [3, 4]]'; + $node['x-example'] = match ($validator->getSpatialType()) { + Database::VAR_POINT => '[1, 2]', + Database::VAR_LINESTRING => '[[1, 2], [3, 4], [5, 6]]', + Database::VAR_POLYGON => '[[[1, 2], [3, 4], [5, 6], [1, 2]]]', + }; break; case 'Utopia\Validator\JSON': case 'Utopia\Validator\Mock': From ef83636f937fb4c2f1085c894393c7fe529030ad Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 8 Sep 2025 23:57:44 +0530 Subject: [PATCH 2/5] empty commit to trigger tests From 0dd7d45993bc949644f9d6eda08c57d23aed92af Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 9 Sep 2025 22:56:59 +0530 Subject: [PATCH 3/5] updated tests --- .../Services/Databases/Legacy/DatabasesBase.php | 16 ++++++++-------- .../Databases/TablesDB/DatabasesBase.php | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 32413ddfd0..80a05c4864 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -6790,7 +6790,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::intersects('polyAttr', [[5.0, 5.0]])->toString()] + 'queries' => [Query::intersects('polyAttr', [5.0, 5.0])->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(1, $response['body']['total']); @@ -6801,7 +6801,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::notIntersects('polyAttr', [[60.0, 60.0]])->toString()] + 'queries' => [Query::notIntersects('polyAttr', [60.0, 60.0])->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(3, $response['body']['total']); @@ -6812,7 +6812,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::overlaps('polyAttr', [$overlapPoly])->toString()] + 'queries' => [Query::overlaps('polyAttr', $overlapPoly)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(1, $response['body']['total']); @@ -6824,7 +6824,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::notOverlaps('polyAttr', [$noOverlapPoly])->toString()] + 'queries' => [Query::notOverlaps('polyAttr', $noOverlapPoly)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(3, $response['body']['total']); @@ -6876,7 +6876,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::crosses('lineAttr', [$crossLine])->toString()] + 'queries' => [Query::crosses('lineAttr', $crossLine)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(1, $response['body']['total']); @@ -6888,7 +6888,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::notCrosses('lineAttr', [$nonCrossLine])->toString()] + 'queries' => [Query::notCrosses('lineAttr', $nonCrossLine)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(3, $response['body']['total']); @@ -6899,7 +6899,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::touches('polyAttr', [$touchPoly])->toString()] + 'queries' => [Query::touches('polyAttr', $touchPoly)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(2, $response['body']['total']); @@ -6911,7 +6911,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::notTouches('polyAttr', [$farPoly])->toString()] + 'queries' => [Query::notTouches('polyAttr', $farPoly)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(3, $response['body']['total']); diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index 35b2b979d6..46d25bcf1f 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -8273,7 +8273,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::overlaps('polyAttr', [$overlapPoly])->toString()] + 'queries' => [Query::overlaps('polyAttr', $overlapPoly)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(1, $response['body']['total']); @@ -8285,7 +8285,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::notOverlaps('polyAttr', [$noOverlapPoly])->toString()] + 'queries' => [Query::notOverlaps('polyAttr', $noOverlapPoly)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(3, $response['body']['total']); @@ -8337,7 +8337,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::crosses('lineAttr', [$crossLine])->toString()] + 'queries' => [Query::crosses('lineAttr', $crossLine)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(1, $response['body']['total']); @@ -8349,7 +8349,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::notCrosses('lineAttr', [$nonCrossLine])->toString()] + 'queries' => [Query::notCrosses('lineAttr', $nonCrossLine)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(3, $response['body']['total']); @@ -8360,7 +8360,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::touches('polyAttr', [$touchPoly])->toString()] + 'queries' => [Query::touches('polyAttr', $touchPoly)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(2, $response['body']['total']); @@ -8372,7 +8372,7 @@ trait DatabasesBase 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'queries' => [Query::notTouches('polyAttr', [$farPoly])->toString()] + 'queries' => [Query::notTouches('polyAttr', $farPoly)->toString()] ]); $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(3, $response['body']['total']); From 56fc3ff3d8c609010143375b84075896ad339e45 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 9 Sep 2025 23:22:47 +0530 Subject: [PATCH 4/5] updated xlist --- .../Databases/Http/Databases/Collections/Documents/XList.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php index 7dfa2a0222..9c8405cf18 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/XList.php @@ -13,7 +13,6 @@ use Appwrite\SDK\Response as SDKResponse; use Appwrite\Utopia\Response as UtopiaResponse; use Utopia\Database\Database; use Utopia\Database\Document; -use Utopia\Database\Exception as DatabaseException; use Utopia\Database\Exception\Order as OrderException; use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Query; @@ -141,10 +140,6 @@ class XList extends Action } catch (QueryException $e) { throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } - // incase of querying distance in multidimenonsal geometry - catch (DatabaseException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); - } $operations = 0; $collectionsCache = []; From 497cf305497ce55b616cd4af82c9752ada2898fd Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Wed, 10 Sep 2025 11:50:58 +0530 Subject: [PATCH 5/5] bump database and migration versions --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 56a32fd753..5b34c42977 100644 --- a/composer.lock +++ b/composer.lock @@ -3650,16 +3650,16 @@ }, { "name": "utopia-php/database", - "version": "1.4.3", + "version": "1.4.4", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "f06a57ab95a86713013fa96919b354bda26f696c" + "reference": "16f96e5d9784dae87d4f6b864e87da8e3be15507" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/f06a57ab95a86713013fa96919b354bda26f696c", - "reference": "f06a57ab95a86713013fa96919b354bda26f696c", + "url": "https://api.github.com/repos/utopia-php/database/zipball/16f96e5d9784dae87d4f6b864e87da8e3be15507", + "reference": "16f96e5d9784dae87d4f6b864e87da8e3be15507", "shasum": "" }, "require": { @@ -3700,9 +3700,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.4.3" + "source": "https://github.com/utopia-php/database/tree/1.4.4" }, - "time": "2025-09-08T12:54:19+00:00" + "time": "2025-09-10T00:50:05+00:00" }, { "name": "utopia-php/detector", @@ -4202,16 +4202,16 @@ }, { "name": "utopia-php/migration", - "version": "1.0.1", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "38171023efd3abe650d2abc5ac65f5df52311da6" + "reference": "c42935a6a4ee3701c68d24244e82ecb39e945ec4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/38171023efd3abe650d2abc5ac65f5df52311da6", - "reference": "38171023efd3abe650d2abc5ac65f5df52311da6", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/c42935a6a4ee3701c68d24244e82ecb39e945ec4", + "reference": "c42935a6a4ee3701c68d24244e82ecb39e945ec4", "shasum": "" }, "require": { @@ -4252,9 +4252,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/1.0.1" + "source": "https://github.com/utopia-php/migration/tree/1.1.1" }, - "time": "2025-08-28T13:41:25+00:00" + "time": "2025-09-10T06:17:20+00:00" }, { "name": "utopia-php/orchestration",