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 4474a26447..3577a30ad2 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -47385,15 +47385,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ 0, 0 ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -47467,7 +47464,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -47479,9 +47476,6 @@ 1 ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -47561,7 +47555,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -47585,9 +47579,6 @@ ] ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -48739,15 +48730,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ 0, 0 ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -48821,7 +48809,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -48833,9 +48821,6 @@ 1 ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -48915,7 +48900,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -48939,9 +48924,6 @@ ] ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, 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 fe90340123..c63d8060b5 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -36255,15 +36255,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ 0, 0 ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -36337,7 +36334,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -36349,9 +36346,6 @@ 1 ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -36431,7 +36425,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -36455,9 +36449,6 @@ ] ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -37609,15 +37600,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ 0, 0 ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -37691,7 +37679,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -37703,9 +37691,6 @@ 1 ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -37785,7 +37770,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -37809,9 +37794,6 @@ ] ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 4474a26447..3577a30ad2 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -47385,15 +47385,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ 0, 0 ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -47467,7 +47464,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -47479,9 +47476,6 @@ 1 ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -47561,7 +47555,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -47585,9 +47579,6 @@ ] ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -48739,15 +48730,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ 0, 0 ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -48821,7 +48809,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -48833,9 +48821,6 @@ 1 ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -48915,7 +48900,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -48939,9 +48924,6 @@ ] ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index fe90340123..c63d8060b5 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -36255,15 +36255,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ 0, 0 ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -36337,7 +36334,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -36349,9 +36346,6 @@ 1 ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -36431,7 +36425,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -36455,9 +36449,6 @@ ] ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -37609,15 +37600,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ 0, 0 ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -37691,7 +37679,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -37703,9 +37691,6 @@ 1 ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, @@ -37785,7 +37770,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -37809,9 +37794,6 @@ ] ] ], - "items": { - "$ref": "#\/components\/schemas\/array" - }, "nullable": true } }, diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 83685ada08..0e0ce3f7fd 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -47406,16 +47406,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ 0, 0 ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -47489,7 +47485,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -47501,10 +47497,6 @@ 1 ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -47584,7 +47576,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -47608,10 +47600,6 @@ ] ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -48764,16 +48752,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ 0, 0 ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -48847,7 +48831,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -48859,10 +48843,6 @@ 1 ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -48942,7 +48922,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -48966,10 +48946,6 @@ ] ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index e8a99e81a7..059a327fa1 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -36367,16 +36367,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ 0, 0 ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -36450,7 +36446,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -36462,10 +36458,6 @@ 1 ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -36545,7 +36537,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -36569,10 +36561,6 @@ ] ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -37725,16 +37713,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ 0, 0 ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -37808,7 +37792,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -37820,10 +37804,6 @@ 1 ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -37903,7 +37883,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -37927,10 +37907,6 @@ ] ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 83685ada08..0e0ce3f7fd 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -47406,16 +47406,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ 0, 0 ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -47489,7 +47485,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -47501,10 +47497,6 @@ 1 ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -47584,7 +47576,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -47608,10 +47600,6 @@ ] ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -48764,16 +48752,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ 0, 0 ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -48847,7 +48831,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -48859,10 +48843,6 @@ 1 ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -48942,7 +48922,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -48966,10 +48946,6 @@ ] ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index e8a99e81a7..059a327fa1 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -36367,16 +36367,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ 0, 0 ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -36450,7 +36446,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -36462,10 +36458,6 @@ 1 ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -36545,7 +36537,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for attribute when not provided. Cannot be set when attribute is required.", "x-example": [ [ @@ -36569,10 +36561,6 @@ ] ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -37725,16 +37713,12 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ 0, 0 ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -37808,7 +37792,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -37820,10 +37804,6 @@ 1 ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, @@ -37903,7 +37883,7 @@ "x-example": "2020-10-15T06:38:00.000+00:00" }, "default": { - "type": "object", + "type": "array", "description": "Default value for column when not provided. Cannot be set when column is required.", "x-example": [ [ @@ -37927,10 +37907,6 @@ ] ] ], - "items": { - "type": "object", - "$ref": "#\/definitions\/array" - }, "x-nullable": true } }, diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 3b2a4d698a..e059eb5a02 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -675,7 +675,11 @@ class OpenAPI3 extends Format $type = 'object'; $output['components']['schemas'][$model->getType()]['properties'][$name]['additionalProperties'] = true; break; - + + case 'array': + $type = 'array'; + break; + case 'integer': $type = 'integer'; $format = 'int32'; diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 25231de008..01ffaa181a 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -683,6 +683,10 @@ class Swagger2 extends Format $type = 'object'; break; + case 'array': + $type = 'array'; + break; + case 'integer': $type = 'integer'; $format = 'int32';