From 4771b6ca788720fafd7bc4a807c5324dc5a34ec2 Mon Sep 17 00:00:00 2001
From: Torsten Dittmann
Date: Tue, 1 Jun 2021 14:13:44 +0200
Subject: [PATCH 01/22] feat(specs): include unused models param
---
app/controllers/mock.php | 28 ++++++++++---------
app/controllers/web/home.php | 8 ++++--
src/Appwrite/Specification/Format.php | 10 ++++++-
.../Specification/Format/Swagger2.php | 13 +++++----
4 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/app/controllers/mock.php b/app/controllers/mock.php
index d9cd03f28..2c5245184 100644
--- a/app/controllers/mock.php
+++ b/app/controllers/mock.php
@@ -6,9 +6,9 @@ use Appwrite\Database\Document;
use Appwrite\Network\Validator\Host;
use Appwrite\Utopia\Response;
use Utopia\App;
-use Utopia\Validator\Numeric;
-use Utopia\Validator\Text;
use Utopia\Validator\ArrayList;
+use Utopia\Validator\Integer;
+use Utopia\Validator\Text;
use Utopia\Storage\Validator\File;
App::get('/v1/mock/tests/foo')
@@ -24,7 +24,7 @@ App::get('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -42,7 +42,7 @@ App::post('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -60,7 +60,7 @@ App::patch('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -78,7 +78,7 @@ App::put('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -96,7 +96,7 @@ App::delete('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -114,7 +114,7 @@ App::get('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -132,7 +132,7 @@ App::post('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -150,7 +150,7 @@ App::patch('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -168,7 +168,7 @@ App::put('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -186,7 +186,7 @@ App::delete('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@@ -205,7 +205,7 @@ App::post('/v1/mock/tests/general/upload')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
- ->param('y', '', new Numeric(), 'Sample numeric param')
+ ->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->param('file', [], new File(), 'Sample file param', false)
->inject('request')
@@ -246,6 +246,7 @@ App::get('/v1/mock/tests/general/redirect')
->label('sdk.description', 'Mock a redirect request.')
->label('sdk.response.code', Response::STATUS_CODE_MOVED_PERMANENTLY)
->label('sdk.response.type', Response::CONTENT_TYPE_HTML)
+ ->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->inject('response')
->action(function ($response) {
@@ -369,6 +370,7 @@ App::get('/v1/mock/tests/general/502-error')
->label('sdk.description', 'Mock a 502 bad gateway.')
->label('sdk.response.code', Response::STATUS_CODE_BAD_GATEWAY)
->label('sdk.response.type', Response::CONTENT_TYPE_TEXT)
+ ->label('sdk.response.model', Response::MODEL_ANY)
->label('sdk.mock', true)
->inject('response')
->action(function ($response) {
diff --git a/app/controllers/web/home.php b/app/controllers/web/home.php
index d76d8da05..6e4544fd7 100644
--- a/app/controllers/web/home.php
+++ b/app/controllers/web/home.php
@@ -8,6 +8,7 @@ use Utopia\App;
use Utopia\View;
use Utopia\Config\Config;
use Utopia\Exception;
+use Utopia\Validator\Boolean;
use Utopia\Validator\Range;
use Utopia\Validator\WhiteList;
@@ -241,10 +242,11 @@ App::get('/specs/:format')
->param('format', 'swagger2', new WhiteList(['swagger2', 'open-api3'], true), 'Spec format.', true)
->param('platform', APP_PLATFORM_CLIENT, new WhiteList([APP_PLATFORM_CLIENT, APP_PLATFORM_SERVER, APP_PLATFORM_CONSOLE], true), 'Choose target platform.', true)
->param('tests', 0, function () {return new Range(0, 1);}, 'Include only test services.', true)
+ ->param('allModels', false, new Boolean(true), 'Also include unused models.', true)
->inject('utopia')
->inject('request')
->inject('response')
- ->action(function ($format, $platform, $tests, $utopia, $request, $response) {
+ ->action(function ($format, $platform, $tests, $allModels, $utopia, $request, $response) {
/** @var Utopia\App $utopia */
/** @var Utopia\Swoole\Request $request */
/** @var Appwrite\Utopia\Response $response */
@@ -425,11 +427,11 @@ App::get('/specs/:format')
switch ($format) {
case 'swagger2':
- $format = new Swagger2($utopia, $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0);
+ $format = new Swagger2($utopia, $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0, $allModels);
break;
case 'open-api3':
- $format = new OpenAPI3($utopia, $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0);
+ $format = new OpenAPI3($utopia, $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0, $allModels);
break;
default:
diff --git a/src/Appwrite/Specification/Format.php b/src/Appwrite/Specification/Format.php
index 62447444f..b61eb7956 100644
--- a/src/Appwrite/Specification/Format.php
+++ b/src/Appwrite/Specification/Format.php
@@ -27,6 +27,11 @@ abstract class Format
* @var Model[]
*/
protected $models;
+
+ /**
+ * @var bool
+ */
+ protected $includeUnusedModels;
/**
* @var array
@@ -62,8 +67,10 @@ abstract class Format
* @param Route[] $routes
* @param Model[] $models
* @param array $keys
+ * @param int $authCount
+ * @param bool $includeUnusedModels
*/
- public function __construct(App $app, array $services, array $routes, array $models, array $keys, int $authCount)
+ public function __construct(App $app, array $services, array $routes, array $models, array $keys, int $authCount, bool $includeUnusedModels = false)
{
$this->app = $app;
$this->services = $services;
@@ -71,6 +78,7 @@ abstract class Format
$this->models = $models;
$this->keys = $keys;
$this->authCount = $authCount;
+ $this->includeUnusedModels = $includeUnusedModels;
}
/**
diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php
index c63be0a70..442df921b 100644
--- a/src/Appwrite/Specification/Format/Swagger2.php
+++ b/src/Appwrite/Specification/Format/Swagger2.php
@@ -4,7 +4,6 @@ namespace Appwrite\Specification\Format;
use Appwrite\Specification\Format;
use Appwrite\Template\Template;
-use Appwrite\Utopia\Response\Model;
use stdClass;
class Swagger2 extends Format
@@ -187,7 +186,7 @@ class Swagger2 extends Format
];
}
- if($route->getLabel('sdk.response.code', 500) === 204) {
+ if(in_array($route->getLabel('sdk.response.code', 500), [204, 301, 302, 308], true)) {
$temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['description'] = 'No content';
unset($temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['schema']);
}
@@ -217,7 +216,7 @@ class Swagger2 extends Format
$bodyRequired = [];
foreach ($route->getParams() as $name => $param) { // Set params
- $validator = (\is_callable($param['validator'])) ? call_user_func_array($param['validator'], $this->app->getResources($param['injections'])) : $param['validator']; /* @var $validator \Utopia\Validator */
+ $validator = (\is_callable($param['validator'])) ? call_user_func_array($param['validator'], $this->app->getResources($param['injections'])) : $param['validator']; /** @var \Utopia\Validator $validator */
$node = [
'name' => $name,
@@ -278,6 +277,7 @@ class Swagger2 extends Format
$node['x-example'] = $validator->getMin();
break;
case 'Utopia\Validator\Numeric':
+ case 'Utopia\Validator\Integer':
$node['type'] = 'integer';
$node['format'] = 'int32';
break;
@@ -354,13 +354,16 @@ class Swagger2 extends Format
}
foreach ($this->models as $model) {
foreach ($model->getRules() as $rule) {
- if (!in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])) {
+ if (
+ in_array($model->getType(), $usedModels)
+ && !in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])
+ ) {
$usedModels[] = $rule['type'];
}
}
}
foreach ($this->models as $model) {
- if (!in_array($model->getType(), $usedModels) && $model->getType() !== 'error') {
+ if (!$this->includeUnusedModels && !in_array($model->getType(), $usedModels)) {
continue;
}
From 95730e74e84987e7429ed12e19c292ff796807ba Mon Sep 17 00:00:00 2001
From: Damodar Lohani
Date: Thu, 3 Jun 2021 12:39:41 +0545
Subject: [PATCH 02/22] fix type
---
src/Appwrite/Utopia/Response/Model/Project.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Appwrite/Utopia/Response/Model/Project.php b/src/Appwrite/Utopia/Response/Model/Project.php
index 1ada772e8..fa3589e1f 100644
--- a/src/Appwrite/Utopia/Response/Model/Project.php
+++ b/src/Appwrite/Utopia/Response/Model/Project.php
@@ -90,7 +90,7 @@ class Project extends Model
'example' => '131102020',
])
->addRule('usersAuthLimit', [
- 'type' => self::TYPE_BOOLEAN,
+ 'type' => self::TYPE_INTEGER,
'description' => 'Max users allowed. 0 is unlimited.',
'default' => 0,
'example' => 100,
From c3a48fec71c44489e68a9a9678af0735d669f671 Mon Sep 17 00:00:00 2001
From: Torsten Dittmann
Date: Thu, 3 Jun 2021 11:33:10 +0200
Subject: [PATCH 03/22] feat(sdks): update to sdk-generator@0.10.9
---
app/config/platforms.php | 18 +--
app/tasks/sdks.php | 2 +-
composer.json | 2 +-
composer.lock | 196 ++++++++++++++++++++++-----------
docs/sdks/dart/CHANGELOG.md | 4 +
docs/sdks/flutter/CHANGELOG.md | 4 +
6 files changed, 151 insertions(+), 75 deletions(-)
diff --git a/app/config/platforms.php b/app/config/platforms.php
index cfb21f3d8..7b3c38f60 100644
--- a/app/config/platforms.php
+++ b/app/config/platforms.php
@@ -15,7 +15,7 @@ return [
[
'key' => 'web',
'name' => 'Web',
- 'version' => '3.0.4',
+ 'version' => '3.0.5',
'url' => 'https://github.com/appwrite/sdk-for-web',
'package' => 'https://www.npmjs.com/package/appwrite',
'enabled' => true,
@@ -62,7 +62,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
- 'version' => '0.6.2',
+ 'version' => '0.6.3',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
@@ -178,7 +178,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
- 'version' => '2.2.2',
+ 'version' => '2.2.4',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
@@ -195,7 +195,7 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
- 'version' => '0.2.1',
+ 'version' => '0.2.2',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@@ -212,7 +212,7 @@ return [
[
'key' => 'php',
'name' => 'PHP',
- 'version' => '2.1.1',
+ 'version' => '2.1.2',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
@@ -229,7 +229,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
- 'version' => '0.2.1',
+ 'version' => '0.2.2',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
@@ -246,7 +246,7 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
- 'version' => '2.1.1',
+ 'version' => '2.1.2',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
@@ -314,7 +314,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
- 'version' => '0.6.1',
+ 'version' => '0.6.2',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
@@ -331,7 +331,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
- 'version' => '0.10.1',
+ 'version' => '0.10.0',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://github.com/appwrite/sdk-for-cli',
'enabled' => true,
diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php
index 108ce7a48..96d9dbf56 100644
--- a/app/tasks/sdks.php
+++ b/app/tasks/sdks.php
@@ -202,7 +202,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
\exec('rm -rf '.$target.' && \
mkdir -p '.$target.' && \
cd '.$target.' && \
- git init && \
+ git init --initial-branch=master && \
git remote add origin '.$gitUrl.' && \
git fetch && \
git pull '.$gitUrl.' && \
diff --git a/composer.json b/composer.json
index 72658f838..9965bf935 100644
--- a/composer.json
+++ b/composer.json
@@ -62,7 +62,7 @@
"slickdeals/statsd": "3.0.2"
},
"require-dev": {
- "appwrite/sdk-generator": "0.10.6",
+ "appwrite/sdk-generator": "0.10.9",
"swoole/ide-helper": "4.6.6",
"phpunit/phpunit": "9.5.4",
"vimeo/psalm": "4.7.2"
diff --git a/composer.lock b/composer.lock
index 6dd867b5c..567347393 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "e433ce62dd355a107816e8967d5c769d",
+ "content-hash": "9fafadf5a0fd53b861e155b775c490d2",
"packages": [
{
"name": "adhocore/jwt",
@@ -1245,16 +1245,16 @@
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.22.1",
+ "version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
+ "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
- "reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
+ "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"shasum": ""
},
"require": {
@@ -1266,7 +1266,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1304,7 +1304,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
},
"funding": [
{
@@ -1320,7 +1320,7 @@
"type": "tidelift"
}
],
- "time": "2021-01-07T16:49:33+00:00"
+ "time": "2021-02-19T12:13:01+00:00"
},
{
"name": "utopia-php/abuse",
@@ -2340,16 +2340,16 @@
},
{
"name": "appwrite/sdk-generator",
- "version": "0.10.6",
+ "version": "0.10.9",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
- "reference": "ab4adb0b9126c617e11c8fdf4352c8aa9a715ecc"
+ "reference": "cac7e3468a30327d6634277722c116a41429b652"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ab4adb0b9126c617e11c8fdf4352c8aa9a715ecc",
- "reference": "ab4adb0b9126c617e11c8fdf4352c8aa9a715ecc",
+ "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/cac7e3468a30327d6634277722c116a41429b652",
+ "reference": "cac7e3468a30327d6634277722c116a41429b652",
"shasum": ""
},
"require": {
@@ -2383,9 +2383,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
- "source": "https://github.com/appwrite/sdk-generator/tree/0.10.6"
+ "source": "https://github.com/appwrite/sdk-generator/tree/0.10.9"
},
- "time": "2021-05-24T14:32:40+00:00"
+ "time": "2021-06-03T09:02:21+00:00"
},
{
"name": "composer/package-versions-deprecated",
@@ -4984,20 +4984,21 @@
},
{
"name": "symfony/console",
- "version": "v5.2.8",
+ "version": "v5.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "864568fdc0208b3eba3638b6000b69d2386e6768"
+ "reference": "058553870f7809087fa80fa734704a21b9bcaeb2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/864568fdc0208b3eba3638b6000b69d2386e6768",
- "reference": "864568fdc0208b3eba3638b6000b69d2386e6768",
+ "url": "https://api.github.com/repos/symfony/console/zipball/058553870f7809087fa80fa734704a21b9bcaeb2",
+ "reference": "058553870f7809087fa80fa734704a21b9bcaeb2",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
"symfony/polyfill-php80": "^1.15",
@@ -5061,7 +5062,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v5.2.8"
+ "source": "https://github.com/symfony/console/tree/v5.3.0"
},
"funding": [
{
@@ -5077,20 +5078,87 @@
"type": "tidelift"
}
],
- "time": "2021-05-11T15:45:21+00:00"
+ "time": "2021-05-26T17:43:10+00:00"
},
{
- "name": "symfony/polyfill-intl-grapheme",
- "version": "v1.22.1",
+ "name": "symfony/deprecation-contracts",
+ "version": "v2.4.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170"
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170",
- "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
+ "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.4-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-03-23T23:28:01+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "v1.23.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab",
+ "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab",
"shasum": ""
},
"require": {
@@ -5102,7 +5170,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -5142,7 +5210,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0"
},
"funding": [
{
@@ -5158,20 +5226,20 @@
"type": "tidelift"
}
],
- "time": "2021-01-22T09:19:47+00:00"
+ "time": "2021-05-27T09:17:38+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
- "version": "v1.22.1",
+ "version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248"
+ "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248",
- "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
+ "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": ""
},
"require": {
@@ -5183,7 +5251,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -5226,7 +5294,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1"
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0"
},
"funding": [
{
@@ -5242,20 +5310,20 @@
"type": "tidelift"
}
],
- "time": "2021-01-22T09:19:47+00:00"
+ "time": "2021-02-19T12:13:01+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.22.1",
+ "version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
+ "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
- "reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
+ "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
"shasum": ""
},
"require": {
@@ -5267,7 +5335,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -5306,7 +5374,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0"
},
"funding": [
{
@@ -5322,20 +5390,20 @@
"type": "tidelift"
}
],
- "time": "2021-01-22T09:19:47+00:00"
+ "time": "2021-05-27T09:27:20+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.22.1",
+ "version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2"
+ "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
- "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
+ "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
"shasum": ""
},
"require": {
@@ -5344,7 +5412,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -5385,7 +5453,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1"
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0"
},
"funding": [
{
@@ -5401,20 +5469,20 @@
"type": "tidelift"
}
],
- "time": "2021-01-07T16:49:33+00:00"
+ "time": "2021-02-19T12:13:01+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.22.1",
+ "version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91"
+ "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91",
- "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
+ "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
"shasum": ""
},
"require": {
@@ -5423,7 +5491,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -5468,7 +5536,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
},
"funding": [
{
@@ -5484,7 +5552,7 @@
"type": "tidelift"
}
],
- "time": "2021-01-07T16:49:33+00:00"
+ "time": "2021-02-19T12:13:01+00:00"
},
{
"name": "symfony/service-contracts",
@@ -5567,16 +5635,16 @@
},
{
"name": "symfony/string",
- "version": "v5.2.8",
+ "version": "v5.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db"
+ "reference": "a9a0f8b6aafc5d2d1c116dcccd1573a95153515b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db",
- "reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db",
+ "url": "https://api.github.com/repos/symfony/string/zipball/a9a0f8b6aafc5d2d1c116dcccd1573a95153515b",
+ "reference": "a9a0f8b6aafc5d2d1c116dcccd1573a95153515b",
"shasum": ""
},
"require": {
@@ -5630,7 +5698,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v5.2.8"
+ "source": "https://github.com/symfony/string/tree/v5.3.0"
},
"funding": [
{
@@ -5646,7 +5714,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-10T14:56:10+00:00"
+ "time": "2021-05-26T17:43:10+00:00"
},
{
"name": "theseer/tokenizer",
@@ -5958,4 +6026,4 @@
"php": "8.0"
},
"plugin-api-version": "2.0.0"
-}
\ No newline at end of file
+}
diff --git a/docs/sdks/dart/CHANGELOG.md b/docs/sdks/dart/CHANGELOG.md
index a908c233b..e0052addc 100644
--- a/docs/sdks/dart/CHANGELOG.md
+++ b/docs/sdks/dart/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.6.2
+
+- Removed default values, nothing should change in usage as default values are already allocated in server
+
## 0.6.1
- Fix for image preview param types
diff --git a/docs/sdks/flutter/CHANGELOG.md b/docs/sdks/flutter/CHANGELOG.md
index 2d808982a..1021124d1 100644
--- a/docs/sdks/flutter/CHANGELOG.md
+++ b/docs/sdks/flutter/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.6.3
+
+- Removed default values, nothing should change in usage as default values are already allocated in server
+
## 0.6.2
- Fixed deployment bug
From 45c3bc9424456b90b29f83518c87b2ec9e442c49 Mon Sep 17 00:00:00 2001
From: Torsten Dittmann
Date: Thu, 3 Jun 2021 11:58:59 +0200
Subject: [PATCH 04/22] revert(spec): option to include all models
---
src/Appwrite/Specification/Format.php | 9 +--------
src/Appwrite/Specification/Format/Swagger2.php | 2 +-
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/Appwrite/Specification/Format.php b/src/Appwrite/Specification/Format.php
index b61eb7956..f76a4c1a5 100644
--- a/src/Appwrite/Specification/Format.php
+++ b/src/Appwrite/Specification/Format.php
@@ -27,11 +27,6 @@ abstract class Format
* @var Model[]
*/
protected $models;
-
- /**
- * @var bool
- */
- protected $includeUnusedModels;
/**
* @var array
@@ -68,9 +63,8 @@ abstract class Format
* @param Model[] $models
* @param array $keys
* @param int $authCount
- * @param bool $includeUnusedModels
*/
- public function __construct(App $app, array $services, array $routes, array $models, array $keys, int $authCount, bool $includeUnusedModels = false)
+ public function __construct(App $app, array $services, array $routes, array $models, array $keys, int $authCount)
{
$this->app = $app;
$this->services = $services;
@@ -78,7 +72,6 @@ abstract class Format
$this->models = $models;
$this->keys = $keys;
$this->authCount = $authCount;
- $this->includeUnusedModels = $includeUnusedModels;
}
/**
diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php
index 54d6e8867..9809220f8 100644
--- a/src/Appwrite/Specification/Format/Swagger2.php
+++ b/src/Appwrite/Specification/Format/Swagger2.php
@@ -364,7 +364,7 @@ class Swagger2 extends Format
}
}
foreach ($this->models as $model) {
- if (!$this->includeUnusedModels && !in_array($model->getType(), $usedModels)) {
+ if (!in_array($model->getType(), $usedModels)) {
continue;
}
From 926d0e328db505093eb58466e97ca0fd8d22cf0a Mon Sep 17 00:00:00 2001
From: Torsten Dittmann
Date: Thu, 3 Jun 2021 14:25:51 +0200
Subject: [PATCH 05/22] feat(sdks): new flutter and dart version
---
app/config/platforms.php | 4 ++--
composer.json | 2 +-
composer.lock | 14 +++++++-------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/app/config/platforms.php b/app/config/platforms.php
index 7b3c38f60..ade2b611a 100644
--- a/app/config/platforms.php
+++ b/app/config/platforms.php
@@ -62,7 +62,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
- 'version' => '0.6.3',
+ 'version' => '0.6.4',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
@@ -314,7 +314,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
- 'version' => '0.6.2',
+ 'version' => '0.6.3',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
diff --git a/composer.json b/composer.json
index 9965bf935..ee9942a9f 100644
--- a/composer.json
+++ b/composer.json
@@ -62,7 +62,7 @@
"slickdeals/statsd": "3.0.2"
},
"require-dev": {
- "appwrite/sdk-generator": "0.10.9",
+ "appwrite/sdk-generator": "0.10.10",
"swoole/ide-helper": "4.6.6",
"phpunit/phpunit": "9.5.4",
"vimeo/psalm": "4.7.2"
diff --git a/composer.lock b/composer.lock
index 567347393..1a89b21c8 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "9fafadf5a0fd53b861e155b775c490d2",
+ "content-hash": "9a72955402438e63ec6101723c33f544",
"packages": [
{
"name": "adhocore/jwt",
@@ -2340,16 +2340,16 @@
},
{
"name": "appwrite/sdk-generator",
- "version": "0.10.9",
+ "version": "0.10.10",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
- "reference": "cac7e3468a30327d6634277722c116a41429b652"
+ "reference": "d09a4dbad3a6d63ad1bb1fec9caa9266e1a9575f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/cac7e3468a30327d6634277722c116a41429b652",
- "reference": "cac7e3468a30327d6634277722c116a41429b652",
+ "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d09a4dbad3a6d63ad1bb1fec9caa9266e1a9575f",
+ "reference": "d09a4dbad3a6d63ad1bb1fec9caa9266e1a9575f",
"shasum": ""
},
"require": {
@@ -2383,9 +2383,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
- "source": "https://github.com/appwrite/sdk-generator/tree/0.10.9"
+ "source": "https://github.com/appwrite/sdk-generator/tree/0.10.10"
},
- "time": "2021-06-03T09:02:21+00:00"
+ "time": "2021-06-03T11:37:55+00:00"
},
{
"name": "composer/package-versions-deprecated",
From ec4d4d56a131f399590ddef750765eb324bfcb2c Mon Sep 17 00:00:00 2001
From: Christy Jacob
Date: Thu, 3 Jun 2021 18:28:40 +0530
Subject: [PATCH 06/22] fix: ignore email case when creating account
---
app/controllers/api/account.php | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php
index c3088c5b5..446dfcf8f 100644
--- a/app/controllers/api/account.php
+++ b/app/controllers/api/account.php
@@ -58,15 +58,18 @@ App::post('/v1/account')
/** @var Appwrite\Database\Database $projectDB */
/** @var Appwrite\Event\Event $audits */
+ $email = \strtolower($email);
if ('console' === $project->getId()) {
- $whitlistEmails = $project->getAttribute('authWhitelistEmails');
- $whitlistIPs = $project->getAttribute('authWhitelistIPs');
+ $whitelistEmails = $project->getAttribute('authWhitelistEmails');
+ $whitelistIPs = $project->getAttribute('authWhitelistIPs');
- if (!empty($whitlistEmails) && !\in_array($email, $whitlistEmails)) {
+ var_dump($whitelistEmails);
+
+ if (!empty($whitelistEmails) && !\in_array($email, $whitelistEmails)) {
throw new Exception('Console registration is restricted to specific emails. Contact your administrator for more information.', 401);
}
- if (!empty($whitlistIPs) && !\in_array($request->getIP(), $whitlistIPs)) {
+ if (!empty($whitelistIPs) && !\in_array($request->getIP(), $whitelistIPs)) {
throw new Exception('Console registration is restricted to specific IPs. Contact your administrator for more information.', 401);
}
}
From 26c46a2278a92d94a0e06c48d6254513d187c552 Mon Sep 17 00:00:00 2001
From: Christy Jacob
Date: Thu, 3 Jun 2021 18:33:51 +0530
Subject: [PATCH 07/22] fix: ignore email case when creating account
---
app/controllers/api/account.php | 5 ++++-
app/controllers/api/users.php | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php
index 446dfcf8f..efa9dc868 100644
--- a/app/controllers/api/account.php
+++ b/app/controllers/api/account.php
@@ -177,6 +177,7 @@ App::post('/v1/account/sessions')
/** @var MaxMind\Db\Reader $geodb */
/** @var Appwrite\Event\Event $audits */
+ $email = \strtolower($email);
$protocol = $request->getProtocol();
$profile = $projectDB->getCollectionFirst([ // Get user by email address
'limit' => 1,
@@ -1089,6 +1090,7 @@ App::patch('/v1/account/email')
throw new Exception('Invalid credentials', 401);
}
+ $email = \strtolower($email);
$profile = $projectDB->getCollectionFirst([ // Get user by email address
'limit' => 1,
'filters' => [
@@ -1411,7 +1413,8 @@ App::post('/v1/account/recovery')
$isPrivilegedUser = Auth::isPrivilegedUser(Authorization::$roles);
$isAppUser = Auth::isAppUser(Authorization::$roles);
-
+
+ $email = \strtolower($email);
$profile = $projectDB->getCollectionFirst([ // Get user by email address
'limit' => 1,
'filters' => [
diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php
index 03543b7cd..49e201e1d 100644
--- a/app/controllers/api/users.php
+++ b/app/controllers/api/users.php
@@ -40,6 +40,7 @@ App::post('/v1/users')
/** @var Appwrite\Utopia\Response $response */
/** @var Appwrite\Database\Database $projectDB */
+ $email = \strtolower($email);
$profile = $projectDB->getCollectionFirst([ // Get user by email address
'limit' => 1,
'filters' => [
From b954e148b535648d8c10c6f476080c21f3846eba Mon Sep 17 00:00:00 2001
From: Christy Jacob
Date: Thu, 3 Jun 2021 19:01:00 +0530
Subject: [PATCH 08/22] feat: review comments
---
app/controllers/api/account.php | 2 --
1 file changed, 2 deletions(-)
diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php
index efa9dc868..13639c912 100644
--- a/app/controllers/api/account.php
+++ b/app/controllers/api/account.php
@@ -63,8 +63,6 @@ App::post('/v1/account')
$whitelistEmails = $project->getAttribute('authWhitelistEmails');
$whitelistIPs = $project->getAttribute('authWhitelistIPs');
- var_dump($whitelistEmails);
-
if (!empty($whitelistEmails) && !\in_array($email, $whitelistEmails)) {
throw new Exception('Console registration is restricted to specific emails. Contact your administrator for more information.', 401);
}
From ef36e9ef49f356a22db7d591cbf351e5b8d09c52 Mon Sep 17 00:00:00 2001
From: Christy Jacob
Date: Fri, 4 Jun 2021 00:35:11 +0530
Subject: [PATCH 09/22] feat: review comments
---
app/controllers/api/teams.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php
index 685402b61..598783128 100644
--- a/app/controllers/api/teams.php
+++ b/app/controllers/api/teams.php
@@ -285,7 +285,8 @@ App::post('/v1/teams/:teamId/memberships')
$isPrivilegedUser = Auth::isPrivilegedUser(Authorization::$roles);
$isAppUser = Auth::isAppUser(Authorization::$roles);
-
+
+ $email = \strtolower($email);
$name = (empty($name)) ? $email : $name;
$team = $projectDB->getDocument($teamId);
From 541ba1d288fb4b10704cdcc53883b6b8cbeb0342 Mon Sep 17 00:00:00 2001
From: "Eldad A. Fux"
Date: Thu, 3 Jun 2021 22:57:10 +0300
Subject: [PATCH 10/22] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 9725943c5..4a3d827c9 100644
--- a/README.md
+++ b/README.md
@@ -9,11 +9,11 @@
+[![Swag Store](https://img.shields.io/badge/swag%20store-f02e65?style=flat-square)](https://store.appwrite.io)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
[![Docker Pulls](https://img.shields.io/docker/pulls/appwrite/appwrite?color=f02e65&style=flat-square)](https://hub.docker.com/r/appwrite/appwrite)
[![Build Status](https://img.shields.io/travis/com/appwrite/appwrite?style=flat-square)](https://travis-ci.com/appwrite/appwrite)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite_io?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite_io)
-[![Follow Appwrite on StackShare](https://img.shields.io/badge/follow%20on-stackshare-blue?style=flat-square)](https://stackshare.io/appwrite)
[**Appwrite 0.8 has been released! Learn what's new!**](https://dev.to/appwrite/announcing-appwrite-0-8-an-open-source-self-hosted-baas-kda)
From 816f76f4e73dabd77610687eb3cdc5efdb510fba Mon Sep 17 00:00:00 2001
From: "Eldad A. Fux"
Date: Thu, 3 Jun 2021 22:57:34 +0300
Subject: [PATCH 11/22] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4a3d827c9..0596bee31 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,8 @@
-[![Swag Store](https://img.shields.io/badge/swag%20store-f02e65?style=flat-square)](https://store.appwrite.io)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
+[![Swag Store](https://img.shields.io/badge/swag%20store-f02e65?style=flat-square)](https://store.appwrite.io)
[![Docker Pulls](https://img.shields.io/docker/pulls/appwrite/appwrite?color=f02e65&style=flat-square)](https://hub.docker.com/r/appwrite/appwrite)
[![Build Status](https://img.shields.io/travis/com/appwrite/appwrite?style=flat-square)](https://travis-ci.com/appwrite/appwrite)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite_io?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite_io)
From 114578f1020211a16b56930b139a1db4ce6154d5 Mon Sep 17 00:00:00 2001
From: Torsten Dittmann
Date: Fri, 4 Jun 2021 10:23:29 +0200
Subject: [PATCH 12/22] remove leftover
---
app/controllers/web/home.php | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/app/controllers/web/home.php b/app/controllers/web/home.php
index 6e4544fd7..f3eeb71c9 100644
--- a/app/controllers/web/home.php
+++ b/app/controllers/web/home.php
@@ -242,11 +242,10 @@ App::get('/specs/:format')
->param('format', 'swagger2', new WhiteList(['swagger2', 'open-api3'], true), 'Spec format.', true)
->param('platform', APP_PLATFORM_CLIENT, new WhiteList([APP_PLATFORM_CLIENT, APP_PLATFORM_SERVER, APP_PLATFORM_CONSOLE], true), 'Choose target platform.', true)
->param('tests', 0, function () {return new Range(0, 1);}, 'Include only test services.', true)
- ->param('allModels', false, new Boolean(true), 'Also include unused models.', true)
->inject('utopia')
->inject('request')
->inject('response')
- ->action(function ($format, $platform, $tests, $allModels, $utopia, $request, $response) {
+ ->action(function ($format, $platform, $tests, $utopia, $request, $response) {
/** @var Utopia\App $utopia */
/** @var Utopia\Swoole\Request $request */
/** @var Appwrite\Utopia\Response $response */
@@ -427,11 +426,11 @@ App::get('/specs/:format')
switch ($format) {
case 'swagger2':
- $format = new Swagger2($utopia, $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0, $allModels);
+ $format = new Swagger2($utopia, $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0);
break;
case 'open-api3':
- $format = new OpenAPI3($utopia, $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0, $allModels);
+ $format = new OpenAPI3($utopia, $services, $routes, $models, $keys[$platform], $authCounts[$platform] ?? 0);
break;
default:
@@ -496,4 +495,4 @@ App::get('/versions')
}
$response->json($versions);
- });
\ No newline at end of file
+ });
From d84d4dc0fd32ae6d5a6cf6aceb87e7121eeda84b Mon Sep 17 00:00:00 2001
From: Eldad Fux
Date: Sat, 5 Jun 2021 14:30:24 +0300
Subject: [PATCH 13/22] Updated cache buster
---
app/init.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/init.php b/app/init.php
index 58ef6ca1b..2f2b27014 100644
--- a/app/init.php
+++ b/app/init.php
@@ -39,7 +39,7 @@ const APP_USERAGENT = APP_NAME.'-Server v%s. Please report abuse at %s';
const APP_MODE_DEFAULT = 'default';
const APP_MODE_ADMIN = 'admin';
const APP_PAGING_LIMIT = 12;
-const APP_CACHE_BUSTER = 146;
+const APP_CACHE_BUSTER = 148;
const APP_VERSION_STABLE = '0.8.0';
const APP_STORAGE_UPLOADS = '/storage/uploads';
const APP_STORAGE_FUNCTIONS = '/storage/functions';
From 5e5a40df631f510778704a41da45b2461debe248 Mon Sep 17 00:00:00 2001
From: Eldad Fux
Date: Sat, 5 Jun 2021 14:30:32 +0300
Subject: [PATCH 14/22] Escaped vars
---
app/views/layouts/default.phtml | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/app/views/layouts/default.phtml b/app/views/layouts/default.phtml
index 465e08366..aa4dfc3f5 100644
--- a/app/views/layouts/default.phtml
+++ b/app/views/layouts/default.phtml
@@ -43,7 +43,7 @@ if(!empty($platforms)) {
-
+
getParam('prefetch', []) as $prefetch): ?>
@@ -52,12 +52,12 @@ if(!empty($platforms)) {
-
-
+
+
-
+
-
+