diff --git a/app/config/specs/open-api3-1.7.x-client.json b/app/config/specs/open-api3-1.7.x-client.json index c8c8bced7a..dc16932fd4 100644 --- a/app/config/specs/open-api3-1.7.x-client.json +++ b/app/config/specs/open-api3-1.7.x-client.json @@ -8480,19 +8480,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/open-api3-1.7.x-console.json b/app/config/specs/open-api3-1.7.x-console.json index 2d4e63cd50..0063b8b557 100644 --- a/app/config/specs/open-api3-1.7.x-console.json +++ b/app/config/specs/open-api3-1.7.x-console.json @@ -37979,19 +37979,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/open-api3-1.7.x-server.json b/app/config/specs/open-api3-1.7.x-server.json index 5df94385d2..b3917036f0 100644 --- a/app/config/specs/open-api3-1.7.x-server.json +++ b/app/config/specs/open-api3-1.7.x-server.json @@ -27865,19 +27865,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index c8c8bced7a..dc16932fd4 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -8480,19 +8480,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 2d4e63cd50..0063b8b557 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -37979,19 +37979,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 5df94385d2..b3917036f0 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -27865,19 +27865,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/swagger2-1.7.x-client.json b/app/config/specs/swagger2-1.7.x-client.json index d9fe0fc2ad..9941e3db2c 100644 --- a/app/config/specs/swagger2-1.7.x-client.json +++ b/app/config/specs/swagger2-1.7.x-client.json @@ -8517,19 +8517,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/swagger2-1.7.x-console.json b/app/config/specs/swagger2-1.7.x-console.json index aa50976993..4b458c3a95 100644 --- a/app/config/specs/swagger2-1.7.x-console.json +++ b/app/config/specs/swagger2-1.7.x-console.json @@ -38140,19 +38140,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/swagger2-1.7.x-server.json b/app/config/specs/swagger2-1.7.x-server.json index 9143acf928..20cf716590 100644 --- a/app/config/specs/swagger2-1.7.x-server.json +++ b/app/config/specs/swagger2-1.7.x-server.json @@ -28093,19 +28093,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index d9fe0fc2ad..9941e3db2c 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -8517,19 +8517,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index aa50976993..4b458c3a95 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -38140,19 +38140,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 9143acf928..20cf716590 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -28093,19 +28093,19 @@ "description": "Document automatically incrementing ID.", "x-example": 1, "format": "int32", - "readonly": true + "readOnly": true }, "$collectionId": { "type": "string", "description": "Collection ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$databaseId": { "type": "string", "description": "Database ID.", "x-example": "5e5ea5c15117e", - "readonly": true + "readOnly": true }, "$createdAt": { "type": "string", diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 16917d92a7..55c71569cb 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -686,7 +686,7 @@ class OpenAPI3 extends Format break; } - $readonly = $rule['readonly'] ?? false; + $readOnly = $rule['readOnly'] ?? false; if ($rule['array']) { $output['components']['schemas'][$model->getType()]['properties'][$name] = [ 'type' => 'array', @@ -700,8 +700,8 @@ class OpenAPI3 extends Format if ($format) { $output['components']['schemas'][$model->getType()]['properties'][$name]['items']['format'] = $format; } - if ($readonly) { - $output['components']['schemas'][$model->getType()]['properties'][$name]['readonly'] = true; + if ($readOnly) { + $output['components']['schemas'][$model->getType()]['properties'][$name]['readOnly'] = true; } } else { $output['components']['schemas'][$model->getType()]['properties'][$name] = [ @@ -713,8 +713,8 @@ class OpenAPI3 extends Format if ($format) { $output['components']['schemas'][$model->getType()]['properties'][$name]['format'] = $format; } - if ($readonly) { - $output['components']['schemas'][$model->getType()]['properties'][$name]['readonly'] = true; + if ($readOnly) { + $output['components']['schemas'][$model->getType()]['properties'][$name]['readOnly'] = true; } } if ($items) { diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 29de27ac97..654284fa0a 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -692,7 +692,7 @@ class Swagger2 extends Format break; } - $readonly = $rule['readonly'] ?? false; + $readOnly = $rule['readOnly'] ?? false; if ($rule['type'] == 'json') { $output['definitions'][$model->getType()]['properties'][$name] = [ 'type' => $type, @@ -701,8 +701,8 @@ class Swagger2 extends Format 'x-example' => $rule['example'] ?? null, ]; - if ($readonly) { - $output['definitions'][$model->getType()]['properties'][$name]['readonly'] = true; + if ($readOnly) { + $output['definitions'][$model->getType()]['properties'][$name]['readOnly'] = true; } continue; } @@ -720,8 +720,8 @@ class Swagger2 extends Format if ($format) { $output['definitions'][$model->getType()]['properties'][$name]['items']['format'] = $format; } - if ($readonly) { - $output['definitions'][$model->getType()]['properties'][$name]['readonly'] = true; + if ($readOnly) { + $output['definitions'][$model->getType()]['properties'][$name]['readOnly'] = true; } } else { $output['definitions'][$model->getType()]['properties'][$name] = [ @@ -733,8 +733,8 @@ class Swagger2 extends Format if ($format) { $output['definitions'][$model->getType()]['properties'][$name]['format'] = $format; } - if ($readonly) { - $output['definitions'][$model->getType()]['properties'][$name]['readonly'] = true; + if ($readOnly) { + $output['definitions'][$model->getType()]['properties'][$name]['readOnly'] = true; } } if ($items) { diff --git a/src/Appwrite/Utopia/Response/Model.php b/src/Appwrite/Utopia/Response/Model.php index 7a297f4420..962da4834c 100644 --- a/src/Appwrite/Utopia/Response/Model.php +++ b/src/Appwrite/Utopia/Response/Model.php @@ -92,7 +92,7 @@ abstract class Model 'description' => '', 'example' => '', 'sensitive' => false, - 'readonly' => false + 'readOnly' => false ], $options); return $this; @@ -133,7 +133,7 @@ abstract class Model /** * Get Readonly Fields * - * Returns list of field names that are marked as readonly + * Returns list of field names that are marked as readOnly * and should not be allowed in create/update payloads * * @return array @@ -143,7 +143,7 @@ abstract class Model $list = []; foreach ($this->rules as $key => $rule) { - if ($rule['readonly'] ?? false) { + if ($rule['readOnly'] ?? false) { $list[] = $key; } } diff --git a/src/Appwrite/Utopia/Response/Model/Document.php b/src/Appwrite/Utopia/Response/Model/Document.php index 90691db78e..5bad504a63 100644 --- a/src/Appwrite/Utopia/Response/Model/Document.php +++ b/src/Appwrite/Utopia/Response/Model/Document.php @@ -41,21 +41,21 @@ class Document extends Any 'description' => 'Document automatically incrementing ID.', 'default' => 0, 'example' => 1, - 'readonly' => true, + 'readOnly' => true, ]) ->addRule('$collectionId', [ 'type' => self::TYPE_STRING, 'description' => 'Collection ID.', 'default' => '', 'example' => '5e5ea5c15117e', - 'readonly' => true, + 'readOnly' => true, ]) ->addRule('$databaseId', [ 'type' => self::TYPE_STRING, 'description' => 'Database ID.', 'default' => '', 'example' => '5e5ea5c15117e', - 'readonly' => true, + 'readOnly' => true, ]) ->addRule('$createdAt', [ 'type' => self::TYPE_DATETIME,