Skip to content

Add int64 format support for integer attributes#11123

Merged
ChiragAgg5k merged 3 commits into1.8.xfrom
feat-integer-format-int64
Jan 14, 2026
Merged

Add int64 format support for integer attributes#11123
ChiragAgg5k merged 3 commits into1.8.xfrom
feat-integer-format-int64

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

Summary

  • Adds format: int64 specification to integer attribute min/max values in API response models
  • Updates all OpenAPI 3.x and Swagger 2.x specifications to reflect this change
  • Ensures proper handling of large integer values (exceeding int32 range) in client SDKs

Changes

  • Modified AttributeInteger model to include format: int64 for min/max fields (src/Appwrite/Utopia/Response/Model/AttributeInteger.php:28, src/Appwrite/Utopia/Response/Model/AttributeInteger.php:36)
  • Modified ColumnInteger model to include format: int64 for min/max fields
  • Regenerated all API specification files (OpenAPI 3.x and Swagger 2.x for client, console, and server platforms)
  • Updated composer.lock

Test plan

  • Verify integer attributes with values exceeding int32 range (2147483647) are properly handled
  • Regenerate SDKs and verify client libraries correctly handle int64 format
  • Test creating integer attributes with min/max values in the int64 range
  • Verify backward compatibility with existing integer attributes

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

Updates integer handling across the codebase: validator construction for integer min/max/default parameters changed from Nullable(new Integer()) to Nullable(new Integer(false, 64)) in multiple database and table/column HTTP endpoints; OpenAPI3 and Swagger2 spec generators now derive integer format from validators/rules (falling back to int32 when unspecified) and propagate parameter formats into request body schemas; AttributeInteger and ColumnInteger response models add 'format' => 'int64' to min/max rule metadata. One constructor gained additional injections (queueForDatabase, queueForEvents).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding int64 format support for integer attributes, which is the core objective of this PR.
Description check ✅ Passed The description is directly related to the changeset, detailing specific modifications to models, specification files, and test plans for implementing int64 format support.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae6df78 and 942cfc4.

⛔ Files ignored due to path filters (5)
  • app/config/specs/open-api3-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-server.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-server.json is excluded by !app/config/specs/**
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php
🧰 Additional context used
🧬 Code graph analysis (2)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: scan
🔇 Additional comments (2)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php (1)

60-62: Same concern regarding negative value validation applies here.

The Integer(false, 64) validator configuration should be verified to ensure negative min/max values are permitted. This is particularly important for the min parameter where negative bounds are common use cases.

The changes are otherwise consistent with the Create endpoint and aligned with the PR objective.

src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php (1)

58-60: Remove the second parameter from new Integer(false, 64) calls; the Integer validator only accepts one parameter.

The Utopia\Validator\Integer constructor signature is public function __construct(bool $loose = false), which accepts only a single boolean parameter. The code passes two arguments (false, 64), which would cause a PHP fatal error: "Too many arguments to function Integer::__construct()". Change lines 58-60 to use new Integer(false) instead.

Additionally, the $loose parameter controls whether numeric strings are accepted as valid integers—it does not restrict negative values. Integer validation in Utopia allows all integer values regardless of sign.

Likely an incorrect or invalid review comment.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 13, 2026

Open in StackBlitz

npm i https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@11123

commit: 5697d98

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 13, 2026

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
libpng 1.6.51-r0 CVE-2025-66293 HIGH
libpng-dev 1.6.51-r0 CVE-2025-66293 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@ChiragAgg5k ChiragAgg5k requested a review from Copilot January 13, 2026 10:45
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
@src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php:
- Around line 60-62: The default parameter for integer columns uses Integer()
without 64-bit support while min/max use Integer(false, 64); update the default
param to use the same 64-bit integer type (i.e., replace Integer() with
Integer(false, 64) inside the Nullable wrapper) in all four endpoints so
validation is consistent — specifically fix the default param in TablesDB Tables
Columns Integer Update (Update.php), TablesDB Columns Integer Create
(Create.php), Databases Collections Attributes Integer Update (Update.php), and
Databases Collections Attributes Integer Create (Create.php) by changing the
Nullable(new Integer()) to Nullable(new Integer(false, 64)).

In @src/Appwrite/SDK/Specification/Format/OpenAPI3.php:
- Around line 627-629: The bug sets the integer format at the wrong schema level
for non-array WhiteList values: when $validator->getType() === 'integer' you
must assign the format to $node['schema']['format'] (not $node['format']) so the
OpenAPI output nests the format under the parameter schema; update the non-array
branch to mirror the array branch's approach (which uses
$node['schema']['items']['format']) and ensure $validator->getFormat() ??
'int32' is stored on $node['schema']['format'].
🧹 Nitpick comments (6)
src/Appwrite/Utopia/Response/Model/AttributeInteger.php (1)

26-48: Consider adding int64 format to the default rule for consistency.

The format: int64 additions to min and max are correct. However, the default rule (lines 42-48) still lacks this format specification. If a user sets min and max in the int64 range, they may also need to specify a default value in that range. Without the format, the API spec may incorrectly indicate default is limited to int32.

Suggested change
         ->addRule('default', [
             'type' => self::TYPE_INTEGER,
+            'format' => 'int64',
             'description' => 'Default value for attribute when not provided. Cannot be set when attribute is required.',
             'default' => null,
             'required' => false,
             'example' => 10,
         ])
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php (1)

68-70: Inconsistent validation: default parameter lacks int64 support.

The min and max parameters now correctly support 64-bit integers. However, default on line 70 still uses new Integer() without the 64-bit flag. This creates an inconsistency where users can set min/max values exceeding int32 range but cannot set a default value in that same range.

Suggested fix
             ->param('min', null, new Nullable(new Integer(false, 64)), 'Minimum value', true)
             ->param('max', null, new Nullable(new Integer(false, 64)), 'Maximum value', true)
-            ->param('default', null, new Nullable(new Integer()), 'Default value. Cannot be set when attribute is required.')
+            ->param('default', null, new Nullable(new Integer(false, 64)), 'Default value. Cannot be set when attribute is required.')
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php (1)

58-60: Same inconsistency: default parameter should also support int64.

For consistency with min and max, the default parameter on line 60 should use Integer(false, 64) as well.

Suggested fix
             ->param('min', null, new Nullable(new Integer(false, 64)), 'Minimum value', true)
             ->param('max', null, new Nullable(new Integer(false, 64)), 'Maximum value', true)
-            ->param('default', null, new Nullable(new Integer()), 'Default value. Cannot be set when column is required.', true)
+            ->param('default', null, new Nullable(new Integer(false, 64)), 'Default value. Cannot be set when column is required.', true)
src/Appwrite/Utopia/Response/Model/ColumnInteger.php (1)

26-48: Consider adding int64 format to the default rule for consistency.

Similar to AttributeInteger, the default rule (lines 42-48) should include 'format' => 'int64' to match min and max, ensuring API spec consistency for values in the int64 range.

Suggested change
         ->addRule('default', [
             'type' => self::TYPE_INTEGER,
+            'format' => 'int64',
             'description' => 'Default value for column when not provided. Cannot be set when column is required.',
             'default' => null,
             'required' => false,
             'example' => 10,
         ])
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php (1)

70-72: Inconsistent validation: default parameter should support int64.

The min and max parameters correctly support 64-bit integers, but default on line 72 uses new Integer() without the 64-bit flag. This prevents users from setting default values in the int64 range when their min/max constraints require it.

Suggested fix
             ->param('min', null, new Nullable(new Integer(false, 64)), 'Minimum value', true)
             ->param('max', null, new Nullable(new Integer(false, 64)), 'Maximum value', true)
-            ->param('default', null, new Nullable(new Integer()), 'Default value. Cannot be set when attribute is required.', true)
+            ->param('default', null, new Nullable(new Integer(false, 64)), 'Default value. Cannot be set when attribute is required.', true)
src/Appwrite/SDK/Specification/Format/OpenAPI3.php (1)

551-557: Missing null fallback for getFormat() call.

Same issue as in Swagger2.php — line 553 calls $validator->getFormat() without a fallback, while other locations in this file (line 603, 802) use fallbacks. Consider adding one for consistency:

♻️ Proposed fix
 case 'Utopia\Validator\Integer':
     $node['schema']['type'] = $validator->getType();
-    $node['schema']['format'] = $validator->getFormat();
+    $node['schema']['format'] = $validator->getFormat() ?? 'int32';
     if (!empty($param['example'])) {
         $node['schema']['x-example'] = $param['example'];
     }
     break;
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a4734a5 and d247ba2.

⛔ Files ignored due to path filters (13)
  • app/config/specs/open-api3-1.8.x-client.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-1.8.x-console.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-1.8.x-server.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-client.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-server.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-client.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-console.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-server.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-client.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-server.json is excluded by !app/config/specs/**
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php
  • src/Appwrite/SDK/Specification/Format/OpenAPI3.php
  • src/Appwrite/SDK/Specification/Format/Swagger2.php
  • src/Appwrite/Utopia/Response/Model/AttributeInteger.php
  • src/Appwrite/Utopia/Response/Model/ColumnInteger.php
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-19T09:20:03.312Z
Learnt from: ItzNotABug
Repo: appwrite/appwrite PR: 9693
File: src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php:57-59
Timestamp: 2025-06-19T09:20:03.312Z
Learning: In table-related endpoints (such as `src/Appwrite/Platform/Modules/Databases/Http/Databases/Tables/Update.php`), parameter descriptions should use "table" and "row" terminology instead of "collection" and "document" for clarity and consistency.

Applied to files:

  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php
🧬 Code graph analysis (5)
src/Appwrite/Utopia/Response/Model/ColumnInteger.php (1)
src/Appwrite/Utopia/Response/Model.php (1)
  • addRule (90-102)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Utopia/Response/Model/AttributeInteger.php (1)
src/Appwrite/Utopia/Response/Model.php (1)
  • addRule (90-102)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build SDK
  • GitHub Check: scan
🔇 Additional comments (6)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php (1)

84-96: LGTM!

The action logic correctly:

  • Defaults min/max to PHP_INT_MIN/PHP_INT_MAX for full 64-bit range
  • Validates that min <= max
  • Determines storage size (8 bytes for int64, 4 bytes for int32) based on the max threshold
src/Appwrite/SDK/Specification/Format/Swagger2.php (3)

686-688: LGTM!

Good addition to propagate the format field to body schema properties. This ensures integer parameters in request bodies correctly reflect their format (int32/int64) in the generated Swagger spec.


781-784: LGTM!

The fallback to 'int32' ensures backward compatibility for model definitions that don't explicitly specify a format.


540-546: Review comment is incorrect—getFormat() always returns a non-null string.

The Utopia\Validator\Integer::getFormat() method has an explicit :string return type (line 138) and always returns a concatenated string like 'int32', 'uint8', etc., based on the bit size and signedness configuration. There is no code path where it could return null.

The comparison to line 783 is not applicable—that line handles user-supplied rule format keys, not validator method returns. Additionally, OpenAPI3.php uses the same pattern without a fallback (calling $validator->getFormat() directly), confirming this is the intended design.

The suggested fallback is unnecessary.

src/Appwrite/SDK/Specification/Format/OpenAPI3.php (2)

697-700: LGTM!

Good addition to propagate the format field to request body schema properties, ensuring integer parameters correctly reflect their format in the generated OpenAPI 3 spec.


800-803: LGTM!

The fallback to 'int32' ensures backward compatibility for model schema definitions that don't explicitly specify a format.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds format: int64 specification to integer attribute min/max values to properly support large integer values that exceed the int32 range (2,147,483,647). This ensures that client SDKs correctly handle 64-bit integers when working with attribute constraints.

Changes:

  • Modified AttributeInteger and ColumnInteger response models to include format: int64 for min/max fields
  • Updated OpenAPI 3.x and Swagger 2.x specification generators to dynamically use validator format instead of hardcoding int32
  • Updated endpoint parameter validators to use 64-bit Integer validator for min/max parameters
  • Regenerated all API specification files (OpenAPI 3.x and Swagger 2.x for client, console, and server)
  • Updated dependencies in composer.lock

Reviewed changes

Copilot reviewed 12 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
AttributeInteger.php Added format: int64 to min/max field definitions in API response model
ColumnInteger.php Added format: int64 to min/max field definitions in API response model
Swagger2.php Modified to dynamically get format from validator instead of hardcoding int32
OpenAPI3.php Modified to dynamically get format from validator instead of hardcoding int32
Create.php (4 files) Updated Integer validator instantiation with 64-bit support for min/max parameters
Update.php (2 files) Updated Integer validator instantiation with 64-bit support for min/max parameters
composer.lock Updated multiple utopia-php dependencies
swagger2-*.json Regenerated specification files with int64 format changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 13, 2026

✨ Benchmark results

  • Requests per second: 2,203
  • Requests with 200 status code: 396,656
  • P99 latency: 0.080045865

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 2,203 1,248
200 396,656 224,682
P99 0.080045865 0.16265482

This change adds int64 format specification to integer attribute min/max values in the API response models and updates all OpenAPI/Swagger specifications accordingly. This ensures proper type handling for large integer values that exceed int32 range in client SDKs.

Changes:
- Add 'format: int64' to min/max fields in AttributeInteger and ColumnInteger models
- Regenerate OpenAPI 3.x and Swagger 2.x specs for all platforms (client, console, server)
- Update composer dependencies
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/Appwrite/Utopia/Response/Model/ColumnInteger.php (1)

42-48: Missing 'format' => 'int64' for the default field.

The min and max fields have been updated to include 'format' => 'int64', but the default field (also TYPE_INTEGER) lacks this format specification. Since a default value must fall within the [min, max] range, it should also support int64 values.

Proposed fix
             ->addRule('default', [
                 'type' => self::TYPE_INTEGER,
+                'format' => 'int64',
                 'description' => 'Default value for column when not provided. Cannot be set when column is required.',
                 'default' => null,
                 'required' => false,
                 'example' => 10,
             ])
🧹 Nitpick comments (1)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php (1)

96-100: Pre-existing: intval() may truncate on 32-bit PHP.

While not introduced by this PR, note that intval() on lines 98-99 could truncate int64 values if running on 32-bit PHP. On 64-bit PHP (typical for modern deployments), this is not an issue. Consider using explicit casting (int) or documenting the 64-bit PHP requirement if int64 support is critical.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d247ba2 and ae6df78.

⛔ Files ignored due to path filters (13)
  • app/config/specs/open-api3-1.8.x-client.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-1.8.x-console.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-1.8.x-server.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-client.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/open-api3-latest-server.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-client.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-console.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-1.8.x-server.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-client.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-console.json is excluded by !app/config/specs/**
  • app/config/specs/swagger2-latest-server.json is excluded by !app/config/specs/**
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php
  • src/Appwrite/SDK/Specification/Format/OpenAPI3.php
  • src/Appwrite/SDK/Specification/Format/Swagger2.php
  • src/Appwrite/Utopia/Response/Model/AttributeInteger.php
  • src/Appwrite/Utopia/Response/Model/ColumnInteger.php
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php
  • src/Appwrite/Utopia/Response/Model/AttributeInteger.php
  • src/Appwrite/SDK/Specification/Format/Swagger2.php
  • src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Create.php
🧰 Additional context used
🧬 Code graph analysis (3)
src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php (1)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Utopia/Response/Model/ColumnInteger.php (1)
src/Appwrite/Utopia/Response/Model.php (1)
  • addRule (90-102)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: E2E Service Test (Console)
  • GitHub Check: E2E Service Test (FunctionsSchedule)
  • GitHub Check: E2E Service Test (GraphQL)
  • GitHub Check: E2E Service Test (Realtime)
  • GitHub Check: E2E Service Test (Sites)
  • GitHub Check: E2E Service Test (Teams)
  • GitHub Check: E2E Service Test (Account)
  • GitHub Check: E2E Service Test (Functions)
  • GitHub Check: E2E Service Test (Messaging)
  • GitHub Check: E2E Service Test (Health)
  • GitHub Check: E2E Service Test (Avatars)
  • GitHub Check: E2E Service Test (Proxy)
  • GitHub Check: E2E Service Test (Users)
  • GitHub Check: E2E Service Test (Tokens)
  • GitHub Check: E2E Service Test (Abuse enabled)
  • GitHub Check: E2E Service Test (Site Screenshots)
  • GitHub Check: Setup & Build SDK
  • GitHub Check: scan
🔇 Additional comments (8)
src/Appwrite/Utopia/Response/Model/ColumnInteger.php (1)

26-41: LGTM for min/max format additions.

Adding 'format' => 'int64' to the min and max rules correctly enables these fields to support values exceeding the int32 range (>2,147,483,647) in the OpenAPI specification output.

src/Appwrite/SDK/Specification/Format/OpenAPI3.php (5)

697-700: LGTM for format propagation to request body.

This correctly ensures that format metadata (e.g., int64) is carried over from parameter schemas to request body properties, maintaining consistency in the generated OpenAPI specification.


602-604: LGTM for WhiteList array integer format handling.

The fallback to 'int32' ensures backward compatibility when the validator doesn't specify a format.


627-629: LGTM for WhiteList integer format handling.

Consistent with the array case above, properly falls back to 'int32'.


800-803: LGTM for model integer rule format handling.

Correctly uses $rule['format'] ?? 'int32' to derive format from model rules (e.g., the 'format' => 'int64' added to ColumnInteger and AttributeInteger models).


551-557: Consider adding a fallback for getFormat() on the Integer validator.

Other integer format assignments in this file (lines 603, 628, 802) use ?? 'int32' as a fallback, but this case does not. If $validator->getFormat() can return null, the schema will have a null format rather than a sensible default. Consider applying the same fallback pattern for consistency.

src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Integer/Update.php (1)

68-70: LGTM for 64-bit integer validator updates.

The validators for min, max, and default are correctly updated to Nullable(Integer(false, 64)), matching the TablesDB counterpart and enabling int64 support.

src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php (1)

60-62: LGTM for 64-bit integer validator updates.

The validators for min, max, and default are correctly updated to Nullable(Integer(false, 64)) across both Create and Update endpoints, enabling support for values exceeding the int32 range. This is consistent with the PR objective and maintains consistency between the two endpoints.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 21 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ChiragAgg5k ChiragAgg5k merged commit 2a17429 into 1.8.x Jan 14, 2026
43 checks passed
@ChiragAgg5k ChiragAgg5k deleted the feat-integer-format-int64 branch January 14, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants