diff --git a/app/config/specs/open-api3-1.6.x-client.json b/app/config/specs/open-api3-1.6.x-client.json index 4a9f55f9cc..a384818bd1 100644 --- a/app/config/specs/open-api3-1.6.x-client.json +++ b/app/config/specs/open-api3-1.6.x-client.json @@ -16,6 +16,9 @@ } }, "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" + }, { "url": "https:\/\/.cloud.appwrite.io\/v1" } diff --git a/app/config/specs/open-api3-1.6.x-console.json b/app/config/specs/open-api3-1.6.x-console.json index 00cddd7195..0284873ab8 100644 --- a/app/config/specs/open-api3-1.6.x-console.json +++ b/app/config/specs/open-api3-1.6.x-console.json @@ -16,6 +16,9 @@ } }, "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" + }, { "url": "https:\/\/.cloud.appwrite.io\/v1" } diff --git a/app/config/specs/open-api3-1.6.x-server.json b/app/config/specs/open-api3-1.6.x-server.json index 2157818d53..5b1865178e 100644 --- a/app/config/specs/open-api3-1.6.x-server.json +++ b/app/config/specs/open-api3-1.6.x-server.json @@ -16,6 +16,9 @@ } }, "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" + }, { "url": "https:\/\/.cloud.appwrite.io\/v1" } diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 4a9f55f9cc..a384818bd1 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -16,6 +16,9 @@ } }, "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" + }, { "url": "https:\/\/.cloud.appwrite.io\/v1" } diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 00cddd7195..0284873ab8 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -16,6 +16,9 @@ } }, "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" + }, { "url": "https:\/\/.cloud.appwrite.io\/v1" } diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 2157818d53..5b1865178e 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -16,6 +16,9 @@ } }, "servers": [ + { + "url": "https:\/\/cloud.appwrite.io\/v1" + }, { "url": "https:\/\/.cloud.appwrite.io\/v1" } diff --git a/app/config/specs/swagger2-1.6.x-client.json b/app/config/specs/swagger2-1.6.x-client.json index 6f1576f7e3..0d0303b25f 100644 --- a/app/config/specs/swagger2-1.6.x-client.json +++ b/app/config/specs/swagger2-1.6.x-client.json @@ -15,7 +15,8 @@ "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" } }, - "host": ".cloud.appwrite.io", + "host": "cloud.appwrite.io", + "x-host-docs": ".cloud.appwrite.io", "basePath": "\/v1", "schemes": [ "https" diff --git a/app/config/specs/swagger2-1.6.x-console.json b/app/config/specs/swagger2-1.6.x-console.json index 131e2826d6..bc4484a470 100644 --- a/app/config/specs/swagger2-1.6.x-console.json +++ b/app/config/specs/swagger2-1.6.x-console.json @@ -15,7 +15,8 @@ "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" } }, - "host": ".cloud.appwrite.io", + "host": "cloud.appwrite.io", + "x-host-docs": ".cloud.appwrite.io", "basePath": "\/v1", "schemes": [ "https" diff --git a/app/config/specs/swagger2-1.6.x-server.json b/app/config/specs/swagger2-1.6.x-server.json index a8b2f911a4..5da541c2d0 100644 --- a/app/config/specs/swagger2-1.6.x-server.json +++ b/app/config/specs/swagger2-1.6.x-server.json @@ -15,7 +15,8 @@ "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" } }, - "host": ".cloud.appwrite.io", + "host": "cloud.appwrite.io", + "x-host-docs": ".cloud.appwrite.io", "basePath": "\/v1", "schemes": [ "https" diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 6f1576f7e3..0d0303b25f 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -15,7 +15,8 @@ "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" } }, - "host": ".cloud.appwrite.io", + "host": "cloud.appwrite.io", + "x-host-docs": ".cloud.appwrite.io", "basePath": "\/v1", "schemes": [ "https" diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 131e2826d6..bc4484a470 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -15,7 +15,8 @@ "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" } }, - "host": ".cloud.appwrite.io", + "host": "cloud.appwrite.io", + "x-host-docs": ".cloud.appwrite.io", "basePath": "\/v1", "schemes": [ "https" diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index a8b2f911a4..5da541c2d0 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -15,7 +15,8 @@ "url": "https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE" } }, - "host": ".cloud.appwrite.io", + "host": "cloud.appwrite.io", + "x-host-docs": ".cloud.appwrite.io", "basePath": "\/v1", "schemes": [ "https" diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index cca26d3b6b..6d83f5053d 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -289,7 +289,8 @@ class Specs extends Action $formatInstance ->setParam('name', APP_NAME) ->setParam('description', 'Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)') - ->setParam('endpoint', 'https://.cloud.appwrite.io/v1') + ->setParam('endpoint', 'https://cloud.appwrite.io/v1') + ->setParam('endpoint.docs', 'https://.cloud.appwrite.io/v1') ->setParam('version', APP_VERSION_STABLE) ->setParam('terms', $endpoint . '/policy/terms') ->setParam('support.email', $email) diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 3d491ab889..ccfdaad87c 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -84,6 +84,9 @@ class OpenAPI3 extends Format [ 'url' => $this->getParam('endpoint', ''), ], + [ + 'url' => $this->getParam('endpoint.docs', ''), + ], ], 'paths' => [], 'tags' => $this->services, diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 2bfe6de288..e5a8c6692e 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -80,6 +80,7 @@ class Swagger2 extends Format ], ], 'host' => \parse_url($this->getParam('endpoint', ''), PHP_URL_HOST), + 'x-host-docs' => \parse_url($this->getParam('endpoint.docs', ''), PHP_URL_HOST), 'basePath' => \parse_url($this->getParam('endpoint', ''), PHP_URL_PATH), 'schemes' => [\parse_url($this->getParam('endpoint', ''), PHP_URL_SCHEME)], 'consumes' => ['application/json', 'multipart/form-data'],