diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index d782408679..61543c2853 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -5020,7 +5020,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7675,7 +7675,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 67eda14f0c..3f0dcc0e2d 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -9575,7 +9575,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -37474,7 +37474,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 6028487515..fd039be84a 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -9057,7 +9057,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -27845,7 +27845,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index d782408679..61543c2853 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -5020,7 +5020,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7675,7 +7675,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 67eda14f0c..3f0dcc0e2d 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -9575,7 +9575,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -37474,7 +37474,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 6028487515..fd039be84a 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -9057,7 +9057,7 @@ "data": { "type": "object", "description": "Document data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -27845,7 +27845,7 @@ "data": { "type": "object", "description": "Row data as JSON object.", - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 59c07f8985..7982031e95 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -5154,7 +5154,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7749,7 +7749,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 8ea3fb49b0..53edc8c93e 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -9680,7 +9680,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -37572,7 +37572,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 8fbc824421..abb141ae66 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -9152,7 +9152,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -28003,7 +28003,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 59c07f8985..7982031e95 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -5154,7 +5154,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -7749,7 +7749,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 8ea3fb49b0..53edc8c93e 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -9680,7 +9680,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -37572,7 +37572,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 8fbc824421..abb141ae66 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -9152,7 +9152,7 @@ "type": "object", "description": "Document data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", @@ -28003,7 +28003,7 @@ "type": "object", "description": "Row data as JSON object.", "default": [], - "x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}" + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" }, "permissions": { "type": "array", diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index fe101c6eef..c03daabd4f 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -116,7 +116,7 @@ class Create extends Action ->param('databaseId', '', new UID(), 'Database ID.') ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.') - ->param('data', [], new JSON(), 'Document data as JSON object.', true, example: '{"username":"john.doe","email":"john.doe@example.com","fullName":"John Doe","age":30,"isAdmin":false}') + ->param('data', [], new JSON(), 'Document data as JSON object.', true, example: '{"username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O\'Brien","age":30,"isAdmin":false}') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('documents', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of documents data as JSON objects.', true, ['plan']) ->inject('response') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php index 11e2596b99..a7aa2607e5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php @@ -95,7 +95,7 @@ class Create extends DocumentCreate ->param('databaseId', '', new UID(), 'Database ID.') ->param('rowId', '', new CustomId(), 'Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) ->param('tableId', '', new UID(), 'Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.') - ->param('data', [], new JSON(), 'Row data as JSON object.', true, example: '{"username":"john.doe","email":"john.doe@example.com","fullName":"John Doe","age":30,"isAdmin":false}') + ->param('data', [], new JSON(), 'Row data as JSON object.', true, example: '{"username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O\'Brien","age":30,"isAdmin":false}') ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->param('rows', [], fn (array $plan) => new ArrayList(new JSON(), $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH), 'Array of documents data as JSON objects.', true, ['plan']) ->inject('response')