mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
update casing
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user