mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Correct response models
This commit is contained in:
parent
be79eb76c6
commit
44fb6f815d
2 changed files with 25 additions and 4 deletions
|
|
@ -10,6 +10,12 @@ class Attribute extends Model
|
|||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->addRule('$collection', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Collection ID.',
|
||||
'default' => '',
|
||||
'example' => '',
|
||||
])
|
||||
->addRule('$id', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Attribute ID.',
|
||||
|
|
@ -39,18 +45,22 @@ class Attribute extends Model
|
|||
'description' => 'Is attribute signed?',
|
||||
'default' => true,
|
||||
'example' => true,
|
||||
'required' => false,
|
||||
])
|
||||
->addRule('array', [
|
||||
'type' => self::TYPE_BOOLEAN,
|
||||
'description' => 'Is attribute an array?',
|
||||
'default' => false,
|
||||
'example' => false,
|
||||
'required' => false
|
||||
])
|
||||
->addRule('filters', [
|
||||
'type' => self::TYPE_JSON,
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Attribute filters.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true,
|
||||
'required' => false,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@ class Index extends Model
|
|||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->addRule('$collection', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Collection ID.',
|
||||
'default' => '',
|
||||
'example' => '',
|
||||
])
|
||||
->addRule('$id', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Index ID.',
|
||||
|
|
@ -23,22 +29,27 @@ class Index extends Model
|
|||
'example' => '',
|
||||
])
|
||||
->addRule('attributes', [
|
||||
'type' => self::TYPE_JSON,
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Index attributes.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true,
|
||||
])
|
||||
->addRule('lengths', [
|
||||
'type' => self::TYPE_JSON,
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Index lengths.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true,
|
||||
'required' => false,
|
||||
])
|
||||
->addRule('orders', [
|
||||
'type' => self::TYPE_JSON,
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Index orders.',
|
||||
'default' => [],
|
||||
'example' => [],
|
||||
'array' => true,
|
||||
'required' => false,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue