Skip to content

Commit

Permalink
Merge branch 'master' of github.com:appwrite/appwrite into feat-redis…
Browse files Browse the repository at this point in the history
…-sync
  • Loading branch information
shimonewman committed Oct 23, 2022
2 parents 7cfdde3 + 04066af commit 3b53fc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Appwrite/Specification/Format/OpenAPI3.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ public function parse(): array
$node['schema']['format'] = 'password';
$node['schema']['x-example'] = 'password';
break;
case 'Appwrite\Auth\Validator\Phone':
$node['schema']['type'] = $validator->getType();
$node['schema']['format'] = 'phone';
$node['schema']['x-example'] = '+12065550100'; // In the US, 555 is reserved like example.com
break;
case 'Utopia\Validator\Range':
/** @var \Utopia\Validator\Range $validator */
$node['schema']['type'] = $validator->getType() === Validator::TYPE_FLOAT ? 'number' : $validator->getType();
Expand Down
5 changes: 5 additions & 0 deletions src/Appwrite/Specification/Format/Swagger2.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,11 @@ public function parse(): array
$node['format'] = 'password';
$node['x-example'] = 'password';
break;
case 'Appwrite\Auth\Validator\Phone':
$node['type'] = $validator->getType();
$node['format'] = 'phone';
$node['x-example'] = '+12065550100';
break;
case 'Utopia\Validator\Range':
/** @var \Utopia\Validator\Range $validator */
$node['type'] = $validator->getType() === Validator::TYPE_FLOAT ? 'number' : $validator->getType();
Expand Down

0 comments on commit 3b53fc7

Please sign in to comment.