From f9ac0b48c8fc92c03895a65dc2ca257ef21bb449 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 10:28:34 +0530 Subject: [PATCH 1/7] fix: use 1.8.x --- app/config/specs/open-api3-1.8.x-client.json | 15 +- app/config/specs/open-api3-1.8.x-console.json | 188 ++++++++++++++++-- app/config/specs/open-api3-1.8.x-server.json | 163 +++++++++++++-- app/config/specs/open-api3-latest-client.json | 15 +- .../specs/open-api3-latest-console.json | 188 ++++++++++++++++-- app/config/specs/open-api3-latest-server.json | 163 +++++++++++++-- app/config/specs/swagger2-1.8.x-client.json | 15 +- app/config/specs/swagger2-1.8.x-console.json | 188 ++++++++++++++++-- app/config/specs/swagger2-1.8.x-server.json | 163 +++++++++++++-- app/config/specs/swagger2-latest-client.json | 15 +- app/config/specs/swagger2-latest-console.json | 188 ++++++++++++++++-- app/config/specs/swagger2-latest-server.json | 163 +++++++++++++-- .../SDK/Specification/Format/OpenAPI3.php | 11 + .../SDK/Specification/Format/Swagger2.php | 11 + src/Appwrite/Utopia/Response/Model.php | 1 + .../Utopia/Response/Model/Attribute.php | 3 +- .../Utopia/Response/Model/Deployment.php | 3 +- .../Utopia/Response/Model/Execution.php | 6 +- .../Utopia/Response/Model/HealthAntivirus.php | 3 +- .../Utopia/Response/Model/HealthStatus.php | 3 +- src/Appwrite/Utopia/Response/Model/Index.php | 3 +- .../Utopia/Response/Model/Platform.php | 3 +- src/Appwrite/Utopia/Response/Model/Rule.php | 6 +- 23 files changed, 1335 insertions(+), 182 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index d226fcc4e1..aabc7d66fb 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -11393,12 +11393,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", 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 02d97fffc7..1e3a876192 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -46461,7 +46461,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46549,7 +46556,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46639,7 +46653,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46729,7 +46750,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46802,7 +46830,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46882,7 +46917,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46972,7 +47014,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47052,7 +47101,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47132,7 +47188,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47212,7 +47275,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47320,7 +47390,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47399,7 +47476,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47490,7 +47574,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48965,7 +49056,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52191,7 +52289,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52356,12 +52461,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -53312,7 +53428,16 @@ "type": { "type": "string", "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "ios", + "android", + "unity" + ] }, "key": { "type": "string", @@ -53614,7 +53739,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53662,7 +53792,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ @@ -55827,7 +55961,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55842,7 +55980,13 @@ "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", 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 09d53dbdf0..af0ca8f886 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -35331,7 +35331,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35419,7 +35426,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35509,7 +35523,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35599,7 +35620,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35672,7 +35700,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35752,7 +35787,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35842,7 +35884,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35922,7 +35971,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36002,7 +36058,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36082,7 +36145,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36190,7 +36260,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36269,7 +36346,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36360,7 +36444,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37835,7 +37926,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40272,7 +40370,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40437,12 +40542,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40811,7 +40927,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40859,7 +40980,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index d226fcc4e1..aabc7d66fb 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -11393,12 +11393,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 02d97fffc7..1e3a876192 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -46461,7 +46461,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46549,7 +46556,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46639,7 +46653,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46729,7 +46750,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46802,7 +46830,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46882,7 +46917,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46972,7 +47014,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47052,7 +47101,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47132,7 +47188,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47212,7 +47275,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47320,7 +47390,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47399,7 +47476,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47490,7 +47574,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48965,7 +49056,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52191,7 +52289,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52356,12 +52461,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -53312,7 +53428,16 @@ "type": { "type": "string", "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "ios", + "android", + "unity" + ] }, "key": { "type": "string", @@ -53614,7 +53739,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53662,7 +53792,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ @@ -55827,7 +55961,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55842,7 +55980,13 @@ "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 09d53dbdf0..af0ca8f886 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -35331,7 +35331,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35419,7 +35426,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35509,7 +35523,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35599,7 +35620,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35672,7 +35700,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35752,7 +35787,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35842,7 +35884,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35922,7 +35971,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36002,7 +36058,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36082,7 +36145,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36190,7 +36260,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36269,7 +36346,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36360,7 +36444,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37835,7 +37926,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40272,7 +40370,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40437,12 +40542,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40811,7 +40927,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40859,7 +40980,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 55911e9556..61428740c1 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -11392,12 +11392,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 6d5721c73b..4f7abe599c 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -46398,7 +46398,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46486,7 +46493,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46576,7 +46590,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46666,7 +46687,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46739,7 +46767,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46819,7 +46854,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46909,7 +46951,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46989,7 +47038,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47069,7 +47125,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47149,7 +47212,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47257,7 +47327,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47336,7 +47413,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47427,7 +47511,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48903,7 +48994,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52139,7 +52237,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52304,12 +52409,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -53268,7 +53384,16 @@ "type": { "type": "string", "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "ios", + "android", + "unity" + ] }, "key": { "type": "string", @@ -53570,7 +53695,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53618,7 +53748,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ @@ -55874,7 +56008,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55889,7 +56027,13 @@ "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 98077f1050..10f1fb323d 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -35359,7 +35359,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35447,7 +35454,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35537,7 +35551,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35627,7 +35648,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35700,7 +35728,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35780,7 +35815,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35870,7 +35912,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35950,7 +35999,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36030,7 +36086,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36110,7 +36173,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36218,7 +36288,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36297,7 +36374,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36388,7 +36472,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37864,7 +37955,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40307,7 +40405,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40472,12 +40577,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40848,7 +40964,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40896,7 +41017,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 55911e9556..61428740c1 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -11392,12 +11392,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 6d5721c73b..4f7abe599c 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -46398,7 +46398,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46486,7 +46493,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46576,7 +46590,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46666,7 +46687,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46739,7 +46767,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46819,7 +46854,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46909,7 +46951,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -46989,7 +47038,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47069,7 +47125,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47149,7 +47212,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47257,7 +47327,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47336,7 +47413,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -47427,7 +47511,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -48903,7 +48994,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -52139,7 +52237,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -52304,12 +52409,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -53268,7 +53384,16 @@ "type": { "type": "string", "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", - "x-example": "web" + "x-example": "web", + "enum": [ + "web", + "flutter-web", + "flutter-ios", + "flutter-android", + "ios", + "android", + "unity" + ] }, "key": { "type": "string", @@ -53570,7 +53695,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -53618,7 +53748,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ @@ -55874,7 +56008,11 @@ "deploymentResourceType": { "type": "string", "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", - "x-example": "function" + "x-example": "function", + "enum": [ + "function", + "site" + ] }, "deploymentResourceId": { "type": "string", @@ -55889,7 +56027,13 @@ "status": { "type": "string", "description": "Domain verification status. Possible values are \"created\", \"verifying\", \"verified\" and \"unverified\"", - "x-example": "verified" + "x-example": "verified", + "enum": [ + "created", + "verifying", + "verified", + "unverified" + ] }, "logs": { "type": "string", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 98077f1050..10f1fb323d 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -35359,7 +35359,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35447,7 +35454,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35537,7 +35551,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35627,7 +35648,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35700,7 +35728,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35780,7 +35815,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35870,7 +35912,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -35950,7 +35999,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36030,7 +36086,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36110,7 +36173,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36218,7 +36288,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36297,7 +36374,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -36388,7 +36472,14 @@ "status": { "type": "string", "description": "Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -37864,7 +37955,14 @@ "status": { "type": "string", "description": "Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`", - "x-example": "available" + "x-example": "available", + "enum": [ + "available", + "processing", + "deleting", + "stuck", + "failed" + ] }, "error": { "type": "string", @@ -40307,7 +40405,14 @@ "status": { "type": "string", "description": "The deployment status. Possible values are \"waiting\", \"processing\", \"building\", \"ready\", and \"failed\".", - "x-example": "ready" + "x-example": "ready", + "enum": [ + "waiting", + "processing", + "building", + "ready", + "failed" + ] }, "buildLogs": { "type": "string", @@ -40472,12 +40577,23 @@ "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", - "x-example": "http" + "x-example": "http", + "enum": [ + "http", + "schedule", + "event" + ] }, "status": { "type": "string", "description": "The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.", - "x-example": "processing" + "x-example": "processing", + "enum": [ + "waiting", + "processing", + "completed", + "failed" + ] }, "requestMethod": { "type": "string", @@ -40848,7 +40964,12 @@ "status": { "type": "string", "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", - "x-example": "online" + "x-example": "online", + "enum": [ + "disabled", + "offline", + "online" + ] } }, "required": [ @@ -40896,7 +41017,11 @@ "status": { "type": "string", "description": "Service status. Possible values can are: `pass`, `fail`", - "x-example": "pass" + "x-example": "pass", + "enum": [ + "pass", + "fail" + ] } }, "required": [ diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index c9c2135ab3..c11e55e733 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -682,6 +682,10 @@ class OpenAPI3 extends Format $type = 'string'; break; + case 'enum': + $type = 'string'; + break; + case 'json': $type = 'object'; $output['components']['schemas'][$model->getType()]['properties'][$name]['additionalProperties'] = true; @@ -770,6 +774,13 @@ class OpenAPI3 extends Format if ($items) { $output['components']['schemas'][$model->getType()]['properties'][$name]['items'] = $items; } + if ($rule['type'] === 'enum' && !empty($rule['enum'])) { + if ($rule['array']) { + $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + } else { + $output['components']['schemas'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + } + } if (!in_array($name, $required)) { $output['components']['schemas'][$model->getType()]['properties'][$name]['nullable'] = true; } diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index a923f40ffa..4e784e8116 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -690,6 +690,10 @@ class Swagger2 extends Format $type = 'string'; break; + case 'enum': + $type = 'string'; + break; + case 'json': $type = 'object'; break; @@ -792,6 +796,13 @@ class Swagger2 extends Format if ($items) { $output['definitions'][$model->getType()]['properties'][$name]['items'] = $items; } + if ($rule['type'] === 'enum' && !empty($rule['enum'])) { + if ($rule['array']) { + $output['definitions'][$model->getType()]['properties'][$name]['items']['enum'] = $rule['enum']; + } else { + $output['definitions'][$model->getType()]['properties'][$name]['enum'] = $rule['enum']; + } + } if (!in_array($name, $required)) { $output['definitions'][$model->getType()]['properties'][$name]['x-nullable'] = true; } diff --git a/src/Appwrite/Utopia/Response/Model.php b/src/Appwrite/Utopia/Response/Model.php index 04468521b6..59c786ee1f 100644 --- a/src/Appwrite/Utopia/Response/Model.php +++ b/src/Appwrite/Utopia/Response/Model.php @@ -16,6 +16,7 @@ abstract class Model public const TYPE_RELATIONSHIP = 'relationship'; public const TYPE_PAYLOAD = 'payload'; public const TYPE_ARRAY = 'array'; + public const TYPE_ENUM = 'enum'; /** * @var bool diff --git a/src/Appwrite/Utopia/Response/Model/Attribute.php b/src/Appwrite/Utopia/Response/Model/Attribute.php index 8c43f8d21c..35de6bacc5 100644 --- a/src/Appwrite/Utopia/Response/Model/Attribute.php +++ b/src/Appwrite/Utopia/Response/Model/Attribute.php @@ -23,10 +23,11 @@ class Attribute extends Model 'example' => 'string', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', 'default' => '', 'example' => 'available', + 'enum' => ['available', 'processing', 'deleting', 'stuck', 'failed'], ]) ->addRule('error', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Deployment.php b/src/Appwrite/Utopia/Response/Model/Deployment.php index 55c1589af0..45699f65d1 100644 --- a/src/Appwrite/Utopia/Response/Model/Deployment.php +++ b/src/Appwrite/Utopia/Response/Model/Deployment.php @@ -95,10 +95,11 @@ class Deployment extends Model 'example' => '5e5ea5c16897e', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'The deployment status. Possible values are "waiting", "processing", "building", "ready", and "failed".', 'default' => '', 'example' => 'ready', + 'enum' => ['waiting', 'processing', 'building', 'ready', 'failed'], ]) ->addRule('buildLogs', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index 39d2203bf9..f8e62fe824 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -52,16 +52,18 @@ class Execution extends Model 'example' => '5e5ea5c16897e', ]) ->addRule('trigger', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.', 'default' => '', 'example' => 'http', + 'enum' => ['http', 'schedule', 'event'], ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.', 'default' => '', 'example' => 'processing', + 'enum' => ['waiting', 'processing', 'completed', 'failed'], ]) ->addRule('requestMethod', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php index 7a74195371..d790dbc24c 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php @@ -17,10 +17,11 @@ class HealthAntivirus extends Model 'example' => '1.0.0', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Antivirus status. Possible values can are: `disabled`, `offline`, `online`', 'default' => '', 'example' => 'online', + 'enum' => ['disabled', 'offline', 'online'], ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/HealthStatus.php b/src/Appwrite/Utopia/Response/Model/HealthStatus.php index ba340107ac..89438c83f2 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthStatus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthStatus.php @@ -23,10 +23,11 @@ class HealthStatus extends Model 'example' => 128, ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Service status. Possible values can are: `pass`, `fail`', 'default' => '', 'example' => 'pass', + 'enum' => ['pass', 'fail'], ]) ; } diff --git a/src/Appwrite/Utopia/Response/Model/Index.php b/src/Appwrite/Utopia/Response/Model/Index.php index 62661738c2..5a4d606408 100644 --- a/src/Appwrite/Utopia/Response/Model/Index.php +++ b/src/Appwrite/Utopia/Response/Model/Index.php @@ -41,10 +41,11 @@ class Index extends Model 'example' => 'primary', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`', 'default' => '', 'example' => 'available', + 'enum' => ['available', 'processing', 'deleting', 'stuck', 'failed'], ]) ->addRule('error', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Platform.php b/src/Appwrite/Utopia/Response/Model/Platform.php index 4b8ffb1486..5fc68ee808 100644 --- a/src/Appwrite/Utopia/Response/Model/Platform.php +++ b/src/Appwrite/Utopia/Response/Model/Platform.php @@ -40,10 +40,11 @@ class Platform extends Model 'example' => 'My Web App', ]) ->addRule('type', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.', 'default' => '', 'example' => 'web', + 'enum' => ['web', 'flutter-web', 'flutter-ios', 'flutter-android', 'ios', 'android', 'unity'], ]) ->addRule('key', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Rule.php b/src/Appwrite/Utopia/Response/Model/Rule.php index 12903b270e..67ba5db94d 100644 --- a/src/Appwrite/Utopia/Response/Model/Rule.php +++ b/src/Appwrite/Utopia/Response/Model/Rule.php @@ -65,10 +65,11 @@ class Rule extends Model 'example' => 'n3u9feiwmf', ]) ->addRule('deploymentResourceType', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Type of deployment. Possible values are "function", "site". Used if rule\'s type is "deployment".', 'default' => '', 'example' => 'function', + 'enum' => ['function', 'site'], ]) ->addRule('deploymentResourceId', [ 'type' => self::TYPE_STRING, @@ -83,10 +84,11 @@ class Rule extends Model 'example' => 'function', ]) ->addRule('status', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_ENUM, 'description' => 'Domain verification status. Possible values are "created", "verifying", "verified" and "unverified"', 'default' => false, 'example' => 'verified', + 'enum' => ['created', 'verifying', 'verified', 'unverified'], ]) ->addRule('logs', [ 'type' => self::TYPE_STRING, From 0f5cb2611d15b3d43d2ce8e0a9c76456a34bd6b1 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 10:32:06 +0530 Subject: [PATCH 2/7] fix: grammer --- app/config/specs/open-api3-1.8.x-console.json | 4 ++-- app/config/specs/open-api3-1.8.x-server.json | 4 ++-- app/config/specs/open-api3-latest-console.json | 4 ++-- app/config/specs/open-api3-latest-server.json | 4 ++-- app/config/specs/swagger2-1.8.x-console.json | 4 ++-- app/config/specs/swagger2-1.8.x-server.json | 4 ++-- app/config/specs/swagger2-latest-console.json | 4 ++-- app/config/specs/swagger2-latest-server.json | 4 ++-- src/Appwrite/Utopia/Response/Model/HealthAntivirus.php | 2 +- src/Appwrite/Utopia/Response/Model/HealthStatus.php | 2 +- 10 files changed, 18 insertions(+), 18 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 1e3a876192..f72da9c18a 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -53738,7 +53738,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -53791,7 +53791,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", 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 af0ca8f886..926b3fa59f 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -40926,7 +40926,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -40979,7 +40979,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 1e3a876192..f72da9c18a 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -53738,7 +53738,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -53791,7 +53791,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index af0ca8f886..926b3fa59f 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -40926,7 +40926,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -40979,7 +40979,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 4f7abe599c..cd6c104c6e 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -53694,7 +53694,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -53747,7 +53747,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 10f1fb323d..f913753279 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -40963,7 +40963,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -41016,7 +41016,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 4f7abe599c..cd6c104c6e 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -53694,7 +53694,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -53747,7 +53747,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 10f1fb323d..f913753279 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -40963,7 +40963,7 @@ }, "status": { "type": "string", - "description": "Antivirus status. Possible values can are: `disabled`, `offline`, `online`", + "description": "Antivirus status. Possible values are: `disabled`, `offline`, `online`", "x-example": "online", "enum": [ "disabled", @@ -41016,7 +41016,7 @@ }, "status": { "type": "string", - "description": "Service status. Possible values can are: `pass`, `fail`", + "description": "Service status. Possible values are: `pass`, `fail`", "x-example": "pass", "enum": [ "pass", diff --git a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php index d790dbc24c..29bd420ce5 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthAntivirus.php @@ -18,7 +18,7 @@ class HealthAntivirus extends Model ]) ->addRule('status', [ 'type' => self::TYPE_ENUM, - 'description' => 'Antivirus status. Possible values can are: `disabled`, `offline`, `online`', + 'description' => 'Antivirus status. Possible values are: `disabled`, `offline`, `online`', 'default' => '', 'example' => 'online', 'enum' => ['disabled', 'offline', 'online'], diff --git a/src/Appwrite/Utopia/Response/Model/HealthStatus.php b/src/Appwrite/Utopia/Response/Model/HealthStatus.php index 89438c83f2..24fb8766ce 100644 --- a/src/Appwrite/Utopia/Response/Model/HealthStatus.php +++ b/src/Appwrite/Utopia/Response/Model/HealthStatus.php @@ -24,7 +24,7 @@ class HealthStatus extends Model ]) ->addRule('status', [ 'type' => self::TYPE_ENUM, - 'description' => 'Service status. Possible values can are: `pass`, `fail`', + 'description' => 'Service status. Possible values are: `pass`, `fail`', 'default' => '', 'example' => 'pass', 'enum' => ['pass', 'fail'], From 40eaf39d91dd6992b8957d67d9516715af575903 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 11:39:00 +0530 Subject: [PATCH 3/7] fix: graphql --- src/Appwrite/GraphQL/Types/Mapper.php | 31 ++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index f0394b2395..22a2c91d7e 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -6,6 +6,7 @@ use Appwrite\GraphQL\Resolvers; use Appwrite\GraphQL\Types; use Appwrite\SDK\Method; use Exception; +use GraphQL\Type\Definition\EnumType; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; use GraphQL\Type\Definition\UnionType; @@ -58,7 +59,8 @@ class Mapper 'json' => Types::json(), 'none' => Types::json(), 'any' => Types::json(), - 'array' => Types::json() + 'array' => Types::json(), + 'enum' => Type::string() ]; foreach ($defaults as $type => $default) { @@ -213,6 +215,8 @@ class Mapper if (\is_array($rule['type'])) { $type = self::getUnionType($escapedKey, $rule); + } elseif ($rule['type'] === 'enum' && !empty($rule['enum'])) { + $type = self::createEnumType($rule, $escapedKey); } else { $type = self::getObjectType($rule); } @@ -387,6 +391,30 @@ class Mapper return $type; } + private static function createEnumType(array $rule, string $fieldName): Type + { + $enumTypeName = \ucfirst($fieldName) . 'Enum'; + + if (Registry::has($enumTypeName)) { + return Registry::get($enumTypeName); + } + + $values = []; + foreach ($rule['enum'] as $enumValue) { + $values[\strtoupper(\str_replace(['-', ' ', '.'], '_', $enumValue))] = [ + 'value' => $enumValue + ]; + } + + $enumType = new EnumType([ + 'name' => $enumTypeName, + 'values' => $values + ]); + + Registry::set($enumTypeName, $enumType); + return $enumType; + } + private static function getObjectType(array $rule): Type { $type = $rule['type']; @@ -460,6 +488,7 @@ class Mapper 'point' => static::model("{$prefix}Point"), 'linestring' => static::model("{$prefix}Line"), 'polygon' => static::model("{$prefix}Polygon"), + 'enum' => static::model("{$prefix}Enum"), default => throw new Exception('Unknown ' . strtolower($prefix) . ' implementation'), }; } From 579f6691f9111047263fa2246e6c17aa1fabf9f4 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 11:42:23 +0530 Subject: [PATCH 4/7] fix: default to be created --- src/Appwrite/Utopia/Response/Model/Rule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/Rule.php b/src/Appwrite/Utopia/Response/Model/Rule.php index 67ba5db94d..7974bc7f98 100644 --- a/src/Appwrite/Utopia/Response/Model/Rule.php +++ b/src/Appwrite/Utopia/Response/Model/Rule.php @@ -86,7 +86,7 @@ class Rule extends Model ->addRule('status', [ 'type' => self::TYPE_ENUM, 'description' => 'Domain verification status. Possible values are "created", "verifying", "verified" and "unverified"', - 'default' => false, + 'default' => 'created', 'example' => 'verified', 'enum' => ['created', 'verifying', 'verified', 'unverified'], ]) From ef69520f95d0469bf83532208119d8c210ac2157 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 11:51:47 +0530 Subject: [PATCH 5/7] fix: nitpick comments --- app/config/specs/open-api3-1.8.x-client.json | 2 +- app/config/specs/open-api3-1.8.x-console.json | 24 +++++++++---------- app/config/specs/open-api3-1.8.x-server.json | 16 ++++++------- app/config/specs/open-api3-latest-client.json | 2 +- .../specs/open-api3-latest-console.json | 24 +++++++++---------- app/config/specs/open-api3-latest-server.json | 16 ++++++------- app/config/specs/swagger2-1.8.x-client.json | 2 +- app/config/specs/swagger2-1.8.x-console.json | 24 +++++++++---------- app/config/specs/swagger2-1.8.x-server.json | 16 ++++++------- app/config/specs/swagger2-latest-client.json | 2 +- app/config/specs/swagger2-latest-console.json | 24 +++++++++---------- app/config/specs/swagger2-latest-server.json | 16 ++++++------- .../Utopia/Response/Model/Deployment.php | 6 ----- .../Utopia/Response/Model/Execution.php | 2 +- .../Utopia/Response/Model/Platform.php | 2 +- src/Appwrite/Utopia/Response/Model/Rule.php | 4 ++-- 16 files changed, 88 insertions(+), 94 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index aabc7d66fb..d57b9f83b2 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -11423,7 +11423,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, 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 f72da9c18a..1dd58c3261 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -52324,11 +52324,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52354,6 +52349,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52381,12 +52381,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52410,12 +52410,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52491,7 +52491,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, @@ -53452,7 +53452,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53485,7 +53485,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -55975,7 +55975,7 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", @@ -56028,7 +56028,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" 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 926b3fa59f..b437d56bfc 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -40405,11 +40405,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40435,6 +40430,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40462,12 +40462,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40491,12 +40491,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40572,7 +40572,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index aabc7d66fb..d57b9f83b2 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -11423,7 +11423,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index f72da9c18a..1dd58c3261 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -52324,11 +52324,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52354,6 +52349,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52381,12 +52381,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52410,12 +52410,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52491,7 +52491,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, @@ -53452,7 +53452,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53485,7 +53485,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -55975,7 +55975,7 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", @@ -56028,7 +56028,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 926b3fa59f..b437d56bfc 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -40405,11 +40405,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40435,6 +40430,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40462,12 +40462,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40491,12 +40491,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40572,7 +40572,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "$ref": "#\/components\/schemas\/headers" }, diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 61428740c1..c2628533d0 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -11422,7 +11422,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index cd6c104c6e..0f91a5433d 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -52272,11 +52272,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52302,6 +52297,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52329,12 +52329,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52358,12 +52358,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52439,7 +52439,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" @@ -53408,7 +53408,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53441,7 +53441,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -56022,7 +56022,7 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", @@ -56075,7 +56075,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index f913753279..679da75e5d 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -40440,11 +40440,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40470,6 +40465,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40497,12 +40497,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40526,12 +40526,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40607,7 +40607,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 61428740c1..c2628533d0 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -11422,7 +11422,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index cd6c104c6e..0f91a5433d 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -52272,11 +52272,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -52302,6 +52297,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -52329,12 +52329,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -52358,12 +52358,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -52439,7 +52439,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" @@ -53408,7 +53408,7 @@ "hostname": { "type": "string", "description": "Web app hostname. Empty string for other platforms.", - "x-example": true + "x-example": "app.example.com" }, "httpUser": { "type": "string", @@ -53441,7 +53441,7 @@ "type": "web", "key": "com.company.appname", "store": "", - "hostname": true, + "hostname": "app.example.com", "httpUser": "username", "httpPass": "password" } @@ -56022,7 +56022,7 @@ "deploymentVcsProviderBranch": { "type": "string", "description": "Name of Git branch that updates rule. Used if type is \"deployment\"", - "x-example": "function" + "x-example": "main" }, "status": { "type": "string", @@ -56075,7 +56075,7 @@ "deploymentId": "n3u9feiwmf", "deploymentResourceType": "function", "deploymentResourceId": "n3u9feiwmf", - "deploymentVcsProviderBranch": "function", + "deploymentVcsProviderBranch": "main", "status": "verified", "logs": "HTTP challegne failed.", "renewAt": "datetime" diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index f913753279..679da75e5d 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -40440,11 +40440,6 @@ "description": "The url of the vcs provider repository", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function" }, - "providerBranch": { - "type": "string", - "description": "The branch of the vcs repository", - "x-example": "0.7.x" - }, "providerCommitHash": { "type": "string", "description": "The commit hash of the vcs commit", @@ -40470,6 +40465,11 @@ "description": "The url of the vcs commit", "x-example": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb" }, + "providerBranch": { + "type": "string", + "description": "The branch of the vcs repository", + "x-example": "0.7.x" + }, "providerBranchUrl": { "type": "string", "description": "The branch of the vcs repository", @@ -40497,12 +40497,12 @@ "providerRepositoryName", "providerRepositoryOwner", "providerRepositoryUrl", - "providerBranch", "providerCommitHash", "providerCommitAuthorUrl", "providerCommitAuthor", "providerCommitMessage", "providerCommitUrl", + "providerBranch", "providerBranchUrl" ], "example": { @@ -40526,12 +40526,12 @@ "providerRepositoryName": "database", "providerRepositoryOwner": "utopia", "providerRepositoryUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function", - "providerBranch": "0.7.x", "providerCommitHash": "7c3f25d", "providerCommitAuthorUrl": "https:\/\/github.com\/vermakhushboo", "providerCommitAuthor": "Khushboo Verma", "providerCommitMessage": "Update index.js", "providerCommitUrl": "https:\/\/github.com\/vermakhushboo\/g4-node-function\/commit\/60c0416257a9cbcdd96b2d370c38d8f8d150ccfb", + "providerBranch": "0.7.x", "providerBranchUrl": "https:\/\/github.com\/vermakhushboo\/appwrite\/tree\/0.7.x" } }, @@ -40607,7 +40607,7 @@ }, "requestHeaders": { "type": "array", - "description": "HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", + "description": "HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.", "items": { "type": "object", "$ref": "#\/definitions\/headers" diff --git a/src/Appwrite/Utopia/Response/Model/Deployment.php b/src/Appwrite/Utopia/Response/Model/Deployment.php index 45699f65d1..f0815630b3 100644 --- a/src/Appwrite/Utopia/Response/Model/Deployment.php +++ b/src/Appwrite/Utopia/Response/Model/Deployment.php @@ -131,12 +131,6 @@ class Deployment extends Model 'default' => '', 'example' => 'https://github.com/vermakhushboo/g4-node-function', ]) - ->addRule('providerBranch', [ - 'type' => self::TYPE_STRING, - 'description' => 'The branch name of the vcs provider repository', - 'default' => '', - 'example' => 'main', - ]) ->addRule('providerCommitHash', [ 'type' => self::TYPE_STRING, 'description' => 'The commit hash of the vcs commit', diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index f8e62fe824..f8ee32aa6e 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -79,7 +79,7 @@ class Execution extends Model ]) ->addRule('requestHeaders', [ 'type' => Response::MODEL_HEADERS, - 'description' => 'HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.', + 'description' => 'HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.', 'default' => [], 'example' => [['Content-Type' => 'application/json']], 'array' => true, diff --git a/src/Appwrite/Utopia/Response/Model/Platform.php b/src/Appwrite/Utopia/Response/Model/Platform.php index 5fc68ee808..65f3c343d4 100644 --- a/src/Appwrite/Utopia/Response/Model/Platform.php +++ b/src/Appwrite/Utopia/Response/Model/Platform.php @@ -61,7 +61,7 @@ class Platform extends Model 'type' => self::TYPE_STRING, 'description' => 'Web app hostname. Empty string for other platforms.', 'default' => '', - 'example' => true, + 'example' => 'app.example.com', ]) ->addRule('httpUser', [ 'type' => self::TYPE_STRING, diff --git a/src/Appwrite/Utopia/Response/Model/Rule.php b/src/Appwrite/Utopia/Response/Model/Rule.php index 7974bc7f98..d4b8ffd9e7 100644 --- a/src/Appwrite/Utopia/Response/Model/Rule.php +++ b/src/Appwrite/Utopia/Response/Model/Rule.php @@ -55,7 +55,7 @@ class Rule extends Model ->addRule('redirectStatusCode', [ 'type' => self::TYPE_INTEGER, 'description' => 'Status code to apply during redirect. Used if type is "redirect"', - 'default' => '', + 'default' => 301, 'example' => 301, ]) ->addRule('deploymentId', [ @@ -81,7 +81,7 @@ class Rule extends Model 'type' => self::TYPE_STRING, 'description' => 'Name of Git branch that updates rule. Used if type is "deployment"', 'default' => '', - 'example' => 'function', + 'example' => 'main', ]) ->addRule('status', [ 'type' => self::TYPE_ENUM, From 1f9bc650de2cdd2c8f17f0f6a0b841c9456839c0 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 15 Sep 2025 12:13:48 +0530 Subject: [PATCH 6/7] work in progress --- src/Appwrite/GraphQL/Types/Mapper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index 22a2c91d7e..c6df475480 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -216,7 +216,7 @@ class Mapper if (\is_array($rule['type'])) { $type = self::getUnionType($escapedKey, $rule); } elseif ($rule['type'] === 'enum' && !empty($rule['enum'])) { - $type = self::createEnumType($rule, $escapedKey); + $type = self::getEnumType($escapedKey, $rule); } else { $type = self::getObjectType($rule); } @@ -391,9 +391,9 @@ class Mapper return $type; } - private static function createEnumType(array $rule, string $fieldName): Type + private static function getEnumType(string $name, array $rule): Type { - $enumTypeName = \ucfirst($fieldName) . 'Enum'; + $enumTypeName = \ucfirst($name) . 'Enum'; if (Registry::has($enumTypeName)) { return Registry::get($enumTypeName); From 31ed7264099c29dbb3c2646f12940a1b8dcc59c5 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 16 Sep 2025 09:48:17 +0530 Subject: [PATCH 7/7] keep graphql backwards --- src/Appwrite/GraphQL/Types/Mapper.php | 29 +-------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index c6df475480..b74e2a7549 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -6,7 +6,6 @@ use Appwrite\GraphQL\Resolvers; use Appwrite\GraphQL\Types; use Appwrite\SDK\Method; use Exception; -use GraphQL\Type\Definition\EnumType; use GraphQL\Type\Definition\ObjectType; use GraphQL\Type\Definition\Type; use GraphQL\Type\Definition\UnionType; @@ -215,8 +214,6 @@ class Mapper if (\is_array($rule['type'])) { $type = self::getUnionType($escapedKey, $rule); - } elseif ($rule['type'] === 'enum' && !empty($rule['enum'])) { - $type = self::getEnumType($escapedKey, $rule); } else { $type = self::getObjectType($rule); } @@ -391,30 +388,6 @@ class Mapper return $type; } - private static function getEnumType(string $name, array $rule): Type - { - $enumTypeName = \ucfirst($name) . 'Enum'; - - if (Registry::has($enumTypeName)) { - return Registry::get($enumTypeName); - } - - $values = []; - foreach ($rule['enum'] as $enumValue) { - $values[\strtoupper(\str_replace(['-', ' ', '.'], '_', $enumValue))] = [ - 'value' => $enumValue - ]; - } - - $enumType = new EnumType([ - 'name' => $enumTypeName, - 'values' => $values - ]); - - Registry::set($enumTypeName, $enumType); - return $enumType; - } - private static function getObjectType(array $rule): Type { $type = $rule['type']; @@ -480,6 +453,7 @@ class Mapper 'ip' => static::model("{$prefix}Ip"), default => static::model("{$prefix}String"), }, + 'enum' => static::model("{$prefix}String"), // TODO: Add enum type (breaking change if added) 'integer' => static::model("{$prefix}Integer"), 'double' => static::model("{$prefix}Float"), 'boolean' => static::model("{$prefix}Boolean"), @@ -488,7 +462,6 @@ class Mapper 'point' => static::model("{$prefix}Point"), 'linestring' => static::model("{$prefix}Line"), 'polygon' => static::model("{$prefix}Polygon"), - 'enum' => static::model("{$prefix}Enum"), default => throw new Exception('Unknown ' . strtolower($prefix) . ' implementation'), }; }