Merge pull request #1331 from appwrite/fix-mock-endpoint-validator
feat: revert integer validator to numeric
This commit is contained in:
commit
329d86f041
2 changed files with 12 additions and 13 deletions
|
@ -22,7 +22,6 @@ 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')
|
||||
|
|
|
@ -7,7 +7,7 @@ use Appwrite\Network\Validator\Host;
|
|||
use Appwrite\Utopia\Response;
|
||||
use Utopia\App;
|
||||
use Utopia\Validator\ArrayList;
|
||||
use Utopia\Validator\Integer;
|
||||
use Utopia\Validator\Numeric;
|
||||
use Utopia\Validator\Text;
|
||||
use Utopia\Storage\Validator\File;
|
||||
|
||||
|
@ -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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), '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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), '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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), '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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), '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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), '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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), '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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), '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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), '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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), '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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
|
@ -230,7 +230,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 Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->param('file', [], new File(), 'Sample file param', false)
|
||||
->inject('request')
|
||||
|
|
Loading…
Reference in a new issue