diff --git a/src/Appwrite/Utopia/Response/Model.php b/src/Appwrite/Utopia/Response/Model.php index 40a882527..a763692c7 100644 --- a/src/Appwrite/Utopia/Response/Model.php +++ b/src/Appwrite/Utopia/Response/Model.php @@ -8,7 +8,7 @@ abstract class Model { const TYPE_STRING = 'string'; const TYPE_INTEGER = 'integer'; - const TYPE_FLOAT = 'float'; + const TYPE_FLOAT = 'double'; const TYPE_BOOLEAN = 'boolean'; const TYPE_JSON = 'json'; diff --git a/src/Appwrite/Utopia/Response/Model/AttributeFloat.php b/src/Appwrite/Utopia/Response/Model/AttributeFloat.php index a0f68ec6a..7c4ead9e7 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeFloat.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeFloat.php @@ -13,18 +13,18 @@ class AttributeFloat extends Attribute $this ->addRule('min', [ - 'type' => self::TYPE_INTEGER, + 'type' => self::TYPE_FLOAT, 'description' => 'Minimum value to enforce for new documents.', 'default' => null, - 'example' => 1, + 'example' => 1.5, 'array' => false, 'require' => false, ]) ->addRule('max', [ - 'type' => self::TYPE_INTEGER, + 'type' => self::TYPE_FLOAT, 'description' => 'Maximum value to enforce for new documents.', 'default' => null, - 'example' => 10, + 'example' => 10.5, 'array' => false, 'require' => false, ]) diff --git a/src/Appwrite/Utopia/Response/Model/AttributeList.php b/src/Appwrite/Utopia/Response/Model/AttributeList.php index 5484db61f..26ea146ec 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeList.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeList.php @@ -25,7 +25,7 @@ class AttributeList extends Model 'getNestedType' => function(Document $attribute) { return match($attribute->getAttribute('type')) { self::TYPE_BOOLEAN => Response::MODEL_ATTRIBUTE_BOOLEAN, - self::TYPE_INTEGER=> Response::MODEL_ATTRIBUTE_INTEGER, + self::TYPE_INTEGER => Response::MODEL_ATTRIBUTE_INTEGER, self::TYPE_FLOAT => Response::MODEL_ATTRIBUTE_FLOAT, self::TYPE_STRING => match($attribute->getAttribute('format')) { APP_DATABASE_ATTRIBUTE_EMAIL => Response::MODEL_ATTRIBUTE_EMAIL,