Merge branch 'master' into fix-nepal-flag
This commit is contained in:
commit
6be6ad8e97
|
@ -15,6 +15,8 @@
|
|||
[![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)
|
||||
|
||||
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker<nobr> microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster.
|
||||
|
||||
Using Appwrite, you can easily integrate your app with user authentication & multiple sign-in methods, a database for storing and querying users and team data, storage and file management, image manipulation, Cloud Functions, and [more services](https://appwrite.io/docs).
|
||||
|
|
|
@ -178,7 +178,7 @@ return [
|
|||
[
|
||||
'key' => 'nodejs',
|
||||
'name' => 'Node.js',
|
||||
'version' => '2.2.0',
|
||||
'version' => '2.2.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-node',
|
||||
'package' => 'https://www.npmjs.com/package/node-appwrite',
|
||||
'enabled' => true,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -759,6 +759,9 @@ App::post('/v1/account/jwt')
|
|||
->label('sdk.namespace', 'account')
|
||||
->label('sdk.method', 'createJWT')
|
||||
->label('sdk.description', '/docs/references/account/create-jwt.md')
|
||||
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
|
||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||
->label('sdk.response.model', Response::MODEL_JWT)
|
||||
->label('abuse-limit', 10)
|
||||
->label('abuse-key', 'url:{url},userId:{param-userId}')
|
||||
->inject('response')
|
||||
|
|
|
@ -22,6 +22,7 @@ use Utopia\Image\Image;
|
|||
use Appwrite\OpenSSL\OpenSSL;
|
||||
use Appwrite\Utopia\Response;
|
||||
use Utopia\Config\Config;
|
||||
use Utopia\Validator\Numeric;
|
||||
|
||||
App::post('/v1/storage/files')
|
||||
->desc('Create File')
|
||||
|
@ -245,7 +246,7 @@ App::get('/v1/storage/files/:fileId/preview')
|
|||
->param('borderWidth', 0, new Range(0, 100), 'Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.', true)
|
||||
->param('borderColor', '', new HexColor(), 'Preview image border color. Use a valid HEX color, no # is needed for prefix.', true)
|
||||
->param('borderRadius', 0, new Range(0, 4000), 'Preview image border radius in pixels. Pass an integer between 0 to 4000.', true)
|
||||
->param('opacity', 1, new Range(0,1), 'Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.', true)
|
||||
->param('opacity', 1, new Range(0,1, Range::TYPE_FLOAT), 'Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.', true)
|
||||
->param('rotation', 0, new Range(0,360), 'Preview image rotation in degrees. Pass an integer between 0 and 360.', true)
|
||||
->param('background', '', new HexColor(), 'Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.', true)
|
||||
->param('output', '', new WhiteList(\array_keys(Config::getParam('storage-outputs')), true), 'Output format type (jpeg, jpg, png, gif and webp).', true)
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
"slickdeals/statsd": "3.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"appwrite/sdk-generator": "0.10.2",
|
||||
"appwrite/sdk-generator": "0.10.3",
|
||||
"swoole/ide-helper": "4.6.6",
|
||||
"phpunit/phpunit": "9.5.4",
|
||||
"vimeo/psalm": "4.7.2"
|
||||
|
|
26
composer.lock
generated
26
composer.lock
generated
|
@ -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": "8e60a590126f27cb20bdfbbc1b73abbb",
|
||||
"content-hash": "c569da48f33b0ae0f5cf529f2e00a447",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
@ -1693,16 +1693,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/framework",
|
||||
"version": "0.14.0",
|
||||
"version": "0.14.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/framework.git",
|
||||
"reference": "92d4a36f3b0e22393a31877c5317c96e01760339"
|
||||
"reference": "632113288bebe41cbef79f0d355bd91609767b8c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/framework/zipball/92d4a36f3b0e22393a31877c5317c96e01760339",
|
||||
"reference": "92d4a36f3b0e22393a31877c5317c96e01760339",
|
||||
"url": "https://api.github.com/repos/utopia-php/framework/zipball/632113288bebe41cbef79f0d355bd91609767b8c",
|
||||
"reference": "632113288bebe41cbef79f0d355bd91609767b8c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1736,9 +1736,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/framework/issues",
|
||||
"source": "https://github.com/utopia-php/framework/tree/0.14.0"
|
||||
"source": "https://github.com/utopia-php/framework/tree/0.14.1"
|
||||
},
|
||||
"time": "2021-04-15T21:01:44+00:00"
|
||||
"time": "2021-05-21T06:41:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/image",
|
||||
|
@ -2340,16 +2340,16 @@
|
|||
},
|
||||
{
|
||||
"name": "appwrite/sdk-generator",
|
||||
"version": "0.10.2",
|
||||
"version": "0.10.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||
"reference": "0e963a0691ec43f39664bcce7860a11e0a152300"
|
||||
"reference": "3c3cc58fa6949d889158e64a41229b7bfa2d3411"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/0e963a0691ec43f39664bcce7860a11e0a152300",
|
||||
"reference": "0e963a0691ec43f39664bcce7860a11e0a152300",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/3c3cc58fa6949d889158e64a41229b7bfa2d3411",
|
||||
"reference": "3c3cc58fa6949d889158e64a41229b7bfa2d3411",
|
||||
"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.2"
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.10.3"
|
||||
},
|
||||
"time": "2021-05-19T19:25:14+00:00"
|
||||
"time": "2021-05-20T08:43:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/package-versions-deprecated",
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace Appwrite\Specification\Format;
|
|||
use Appwrite\Specification\Format;
|
||||
use Appwrite\Template\Template;
|
||||
use stdClass;
|
||||
use Utopia\Validator;
|
||||
|
||||
class OpenAPI3 extends Format
|
||||
{
|
||||
|
@ -230,24 +231,24 @@ class OpenAPI3 extends Format
|
|||
|
||||
switch ((!empty($validator)) ? \get_class($validator) : '') {
|
||||
case 'Utopia\Validator\Text':
|
||||
$node['schema']['type'] = 'string';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['x-example'] = '['.\strtoupper(Template::fromCamelCaseToSnake($node['name'])).']';
|
||||
break;
|
||||
case 'Utopia\Validator\Boolean':
|
||||
$node['schema']['type'] = 'boolean';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['x-example'] = false;
|
||||
break;
|
||||
case 'Appwrite\Database\Validator\UID':
|
||||
$node['schema']['type'] = 'string';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['x-example'] = '['.\strtoupper(Template::fromCamelCaseToSnake($node['name'])).']';
|
||||
break;
|
||||
case 'Appwrite\Network\Validator\Email':
|
||||
$node['schema']['type'] = 'string';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['format'] = 'email';
|
||||
$node['schema']['x-example'] = 'email@example.com';
|
||||
break;
|
||||
case 'Appwrite\Network\Validator\URL':
|
||||
$node['schema']['type'] = 'string';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['format'] = 'url';
|
||||
$node['schema']['x-example'] = 'https://example.com';
|
||||
break;
|
||||
|
@ -261,7 +262,7 @@ class OpenAPI3 extends Format
|
|||
break;
|
||||
case 'Utopia\Storage\Validator\File':
|
||||
$consumes = ['multipart/form-data'];
|
||||
$node['schema']['type'] = 'string';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['format'] = 'binary';
|
||||
break;
|
||||
case 'Utopia\Validator\ArrayList':
|
||||
|
@ -271,24 +272,24 @@ class OpenAPI3 extends Format
|
|||
];
|
||||
break;
|
||||
case 'Appwrite\Auth\Validator\Password':
|
||||
$node['schema']['type'] = 'string';
|
||||
$node['schema']['format'] = 'format';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['format'] = 'password';
|
||||
$node['schema']['x-example'] = 'password';
|
||||
break;
|
||||
case 'Utopia\Validator\Range': /** @var \Utopia\Validator\Range $validator */
|
||||
$node['schema']['type'] = 'integer';
|
||||
$node['schema']['format'] = 'int32';
|
||||
$node['schema']['type'] = $validator->getType() === Validator::TYPE_FLOAT ? 'number': $validator->getType();
|
||||
$node['schema']['format'] = $validator->getType() == Validator::TYPE_INTEGER ? 'int32' : 'float';
|
||||
$node['schema']['x-example'] = $validator->getMin();
|
||||
break;
|
||||
case 'Utopia\Validator\Numeric':
|
||||
$node['schema']['type'] = 'integer';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['format'] = 'int32';
|
||||
break;
|
||||
case 'Utopia\Validator\Length':
|
||||
$node['schema']['type'] = 'string';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
break;
|
||||
case 'Appwrite\Network\Validator\Host':
|
||||
$node['schema']['type'] = 'string';
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['format'] = 'url';
|
||||
$node['schema']['x-example'] = 'https://example.com';
|
||||
break;
|
||||
|
|
|
@ -6,6 +6,7 @@ use Appwrite\Specification\Format;
|
|||
use Appwrite\Template\Template;
|
||||
use Appwrite\Utopia\Response\Model;
|
||||
use stdClass;
|
||||
use Utopia\Validator;
|
||||
|
||||
class Swagger2 extends Format
|
||||
{
|
||||
|
@ -227,24 +228,24 @@ class Swagger2 extends Format
|
|||
|
||||
switch ((!empty($validator)) ? \get_class($validator) : '') {
|
||||
case 'Utopia\Validator\Text':
|
||||
$node['type'] = 'string';
|
||||
$node['type'] = $validator->getType();
|
||||
$node['x-example'] = '['.\strtoupper(Template::fromCamelCaseToSnake($node['name'])).']';
|
||||
break;
|
||||
case 'Utopia\Validator\Boolean':
|
||||
$node['type'] = 'boolean';
|
||||
$node['type'] = $validator->getType();
|
||||
$node['x-example'] = false;
|
||||
break;
|
||||
case 'Appwrite\Database\Validator\UID':
|
||||
$node['type'] = 'string';
|
||||
$node['type'] = $validator->getType();
|
||||
$node['x-example'] = '['.\strtoupper(Template::fromCamelCaseToSnake($node['name'])).']';
|
||||
break;
|
||||
case 'Appwrite\Network\Validator\Email':
|
||||
$node['type'] = 'string';
|
||||
$node['type'] = $validator->getType();
|
||||
$node['format'] = 'email';
|
||||
$node['x-example'] = 'email@example.com';
|
||||
break;
|
||||
case 'Appwrite\Network\Validator\URL':
|
||||
$node['type'] = 'string';
|
||||
$node['type'] = $validator->getType();
|
||||
$node['format'] = 'url';
|
||||
$node['x-example'] = 'https://example.com';
|
||||
break;
|
||||
|
@ -258,7 +259,7 @@ class Swagger2 extends Format
|
|||
break;
|
||||
case 'Utopia\Storage\Validator\File':
|
||||
$consumes = ['multipart/form-data'];
|
||||
$node['type'] = 'file';
|
||||
$node['type'] = $validator->getType();
|
||||
break;
|
||||
case 'Utopia\Validator\ArrayList':
|
||||
$node['type'] = 'array';
|
||||
|
@ -268,24 +269,24 @@ class Swagger2 extends Format
|
|||
];
|
||||
break;
|
||||
case 'Appwrite\Auth\Validator\Password':
|
||||
$node['type'] = 'string';
|
||||
$node['format'] = 'format';
|
||||
$node['type'] = $validator->getType();
|
||||
$node['format'] = 'password';
|
||||
$node['x-example'] = 'password';
|
||||
break;
|
||||
case 'Utopia\Validator\Range': /** @var \Utopia\Validator\Range $validator */
|
||||
$node['type'] = 'integer';
|
||||
$node['format'] = 'int32';
|
||||
$node['type'] = $validator->getType() === Validator::TYPE_FLOAT ? 'number': $validator->getType();
|
||||
$node['format'] = $validator->getType() == Validator::TYPE_INTEGER ? 'int32' : 'float';
|
||||
$node['x-example'] = $validator->getMin();
|
||||
break;
|
||||
case 'Utopia\Validator\Numeric':
|
||||
$node['type'] = 'integer';
|
||||
$node['type'] = $validator->getType();
|
||||
$node['format'] = 'int32';
|
||||
break;
|
||||
case 'Utopia\Validator\Length':
|
||||
$node['type'] = 'string';
|
||||
$node['type'] = $validator->getType();
|
||||
break;
|
||||
case 'Appwrite\Network\Validator\Host':
|
||||
$node['type'] = 'string';
|
||||
$node['type'] = $validator->getType();
|
||||
$node['format'] = 'url';
|
||||
$node['x-example'] = 'https://example.com';
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue