Skip to content

chore: release sdks for adding getScreenshot method to Avatars service#10882

Merged
abnegate merged 8 commits into1.8.xfrom
release-sdks-4
Dec 5, 2025
Merged

chore: release sdks for adding getScreenshot method to Avatars service#10882
abnegate merged 8 commits into1.8.xfrom
release-sdks-4

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 28, 2025

📝 Walkthrough

Walkthrough

This PR updates SDK version strings in app/config/platforms.php; expands and tightens parameter validators and examples for the /v1/avatars/screenshots endpoint in app/controllers/api/avatars.php, builds a structured browser capture config (headers object, viewport object, sleep converted to ms, optional userAgent/locale/timezone/geolocation/hasTouch/permissions), posts that config to a browser service, and adds conditional post-fetch image processing (crop/convert/quality/output). It also updates SDK specification formatting in src/Appwrite/SDK/Specification/Format.php, OpenAPI3.php, and Swagger2.php to map the permissions param to BrowserPermission, treat Utopia\Validator\WhiteList in array and non-array contexts, and prefer per-parameter example values when generating x-example and enum metadata.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Heterogeneous changes: behavioral API handler edits, spec-generator logic updates, plus many repetitive version bumps.
  • Review focus:
    • app/controllers/api/avatars.php — expanded param validators, config construction (headers/viewport/permissions/geolocation/sleep ms), browser service request/response error paths, and image processing/cropping/format/quality branching.
    • src/Appwrite/SDK/Specification/Format.php — new mapping for permissionsBrowserPermission.
    • src/Appwrite/SDK/Specification/Format/OpenAPI3.php and Swagger2.php — WhiteList handling (array vs non-array), conditional x-example and enum/x-enum-* emission, and array item typing.
    • app/config/platforms.php — bulk SDK version updates (consistency and intended targets).

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author, making it impossible to assess whether the description relates to the changeset. Add a pull request description explaining the purpose of this SDK release, such as which SDKs are being updated, what the getScreenshot method does, and any breaking changes or important notes for users.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: releasing SDKs with the new getScreenshot method for the Avatars service, which aligns with the changes across multiple SDK specification files and avatar controller updates.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release-sdks-4

📜 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 68ffa52 and b06b330.

📒 Files selected for processing (1)
  • src/Appwrite/SDK/Specification/Format/Swagger2.php (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Appwrite/SDK/Specification/Format/Swagger2.php
⏰ 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 SDK
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: scan

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.

@ChiragAgg5k ChiragAgg5k changed the title Add teamId to project array in e2e test.x chore: release sdks for adding getScreenshot method to Avatars service Nov 28, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 28, 2025

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
imagemagick 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-c++ 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-dev 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-heic 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-jpeg 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-jxl 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-libs 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-openexr 7.1.2.3-r0 CVE-2025-62171 HIGH
imagemagick-webp 7.1.2.3-r0 CVE-2025-62171 HIGH
libecpg 17.6-r0 CVE-2025-12818 HIGH
libecpg-dev 17.6-r0 CVE-2025-12818 HIGH
libpng 1.6.47-r0 CVE-2025-64720 HIGH
libpng 1.6.47-r0 CVE-2025-65018 HIGH
libpng-dev 1.6.47-r0 CVE-2025-64720 HIGH
libpng-dev 1.6.47-r0 CVE-2025-65018 HIGH
libpq 17.6-r0 CVE-2025-12818 HIGH
libpq-dev 17.6-r0 CVE-2025-12818 HIGH
libxml2 2.13.8-r0 CVE-2025-49794 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49796 CRITICAL
libxml2 2.13.8-r0 CVE-2025-49795 HIGH
libxml2 2.13.8-r0 CVE-2025-6021 HIGH
postgresql17-dev 17.6-r0 CVE-2025-12818 HIGH
github.com/containerd/containerd/v2 v2.0.2 CVE-2024-25621 HIGH
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH
stdlib 1.22.10 CVE-2025-47907 HIGH
stdlib 1.22.10 CVE-2025-58183 HIGH
stdlib 1.22.10 CVE-2025-58186 HIGH
stdlib 1.22.10 CVE-2025-58187 HIGH
stdlib 1.22.10 CVE-2025-61729 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 28, 2025

✨ Benchmark results

  • Requests per second: 1,130
  • Requests with 200 status code: 203,388
  • P99 latency: 0.171128931

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,130 1,121
200 203,388 201,811
P99 0.171128931 0.184795138

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Dec 1, 2025

Open in StackBlitz

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

commit: b06b330

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)
app/controllers/api/avatars.php (1)

649-649: Cache key is missing critical parameters that affect output.

The cache resource key is missing headers, viewportWidth, and viewportHeight parameters. Since these parameters affect the screenshot output:

  • Different headers (e.g., auth tokens) could result in different page content
  • Different viewport dimensions produce different screenshots

This could lead to incorrect cached responses being served.

-    ->label('cache.resource', 'screenshot/{request.url}/{request.width}/{request.height}/{request.scale}/{request.theme}/{request.userAgent}/{request.fullpage}/{request.locale}/{request.timezone}/{request.latitude}/{request.longitude}/{request.accuracy}/{request.touch}/{request.permissions}/{request.sleep}/{request.quality}/{request.output}')
+    ->label('cache.resource', 'screenshot/{request.url}/{request.headers}/{request.viewportWidth}/{request.viewportHeight}/{request.width}/{request.height}/{request.scale}/{request.theme}/{request.userAgent}/{request.fullpage}/{request.locale}/{request.timezone}/{request.latitude}/{request.longitude}/{request.accuracy}/{request.touch}/{request.permissions}/{request.sleep}/{request.quality}/{request.output}')
🧹 Nitpick comments (3)
app/controllers/api/avatars.php (3)

673-673: Consider increasing locale text length limit.

The Text(10) validator may be too restrictive for valid BCP 47 locale tags. For example, zh-Hans-CN is exactly 10 characters, and sr-Latn-RS is also 10 characters, meaning there's no room for edge cases. Consider increasing to Text(35) to accommodate the full BCP 47 specification.

-    ->param('locale', '', new Text(10), 'Browser locale (e.g., "en-US", "fr-FR"). Defaults to browser default.', true, example: 'en-US')
+    ->param('locale', '', new Text(35), 'Browser locale (e.g., "en-US", "fr-FR"). Defaults to browser default.', true, example: 'en-US')

750-757: Consider explicit geolocation flag or tolerance for coordinate check.

The condition $latitude != 0 || $longitude != 0 may not reliably detect when geolocation is intentionally set, as:

  1. The (0, 0) coordinate ("Null Island" in the Gulf of Guinea) is a valid location
  2. Floating-point comparisons to 0 can be unreliable

If a user genuinely wants to capture a screenshot with geolocation set to (0, 0), it would be ignored. Consider adding an explicit flag parameter or using a different sentinel value (e.g., null if the framework supports it).


817-819: Consider sanitizing error messages from external service.

The error message from the browser service is passed directly to the user via $th->getMessage(). This could potentially expose internal service details or stack traces. Consider providing a more generic error message while logging the full details server-side.

        } catch (\Throwable $th) {
-            throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED, 'Screenshot generation failed: ' . $th->getMessage());
+            // Log the full error for debugging
+            // Consider adding: $logger?->addError('Screenshot generation failed', ['error' => $th->getMessage()]);
+            throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED, 'Screenshot generation failed');
        }
📜 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 6aa054b and aaafdaa.

⛔ Files ignored due to path filters (30)
  • 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/**
  • docs/examples/1.8.x/client-android/java/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/client-android/kotlin/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/client-apple/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/client-flutter/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/client-react-native/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/client-web/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/console-web/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/console-web/examples/vcs/list-repositories.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-dart/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-dotnet/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-go/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-kotlin/java/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-kotlin/kotlin/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-nodejs/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-php/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-python/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-ruby/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
  • docs/examples/1.8.x/server-swift/examples/avatars/get-screenshot.md is excluded by !docs/examples/**
📒 Files selected for processing (1)
  • app/controllers/api/avatars.php (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
app/controllers/api/avatars.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: Unit Test
  • GitHub Check: Benchmark
  • GitHub Check: Setup & Build SDK
  • GitHub Check: scan
🔇 Additional comments (2)
app/controllers/api/avatars.php (2)

687-687: LGTM!

The action function signature correctly aligns with the parameter definitions, with appropriate types for each parameter (float for scale/coordinates, bool for fullpage/touch, array for headers/permissions).


728-731: LGTM!

The mapping from user-facing scale parameter to deviceScaleFactor aligns with browser automation APIs (Puppeteer/Playwright convention). The conditional addition avoids sending default values.

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: 1

🧹 Nitpick comments (2)
src/Appwrite/SDK/Specification/Format/OpenAPI3.php (1)

604-661: Consider extracting the blacklist check into a helper method.

The blacklist iteration logic is duplicated between the array and non-array branches (lines 618-627 and 643-652). While correct, extracting this into a private method would reduce duplication.

+    private function isEnumBlacklisted(string $namespace, string $method, string $param): bool
+    {
+        foreach ($this->enumBlacklist as $blacklist) {
+            if (
+                $blacklist['namespace'] == $namespace
+                && $blacklist['method'] == $method
+                && $blacklist['parameter'] == $param
+            ) {
+                return true;
+            }
+        }
+        return false;
+    }
app/controllers/api/avatars.php (1)

768-779: Consider sanitizing error messages from external service.

The error message on line 778 includes the raw response body from the browser service: 'Screenshot service failed: ' . $fetchResponse->getBody(). This could potentially expose internal implementation details to API consumers.

             if ($fetchResponse->getStatusCode() >= 400) {
-                throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED, 'Screenshot service failed: ' . $fetchResponse->getBody());
+                throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED, 'Screenshot service failed');
             }
📜 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 aaafdaa and 0c114b8.

⛔ Files ignored due to path filters (12)
  • 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/**
📒 Files selected for processing (4)
  • app/controllers/api/avatars.php (1 hunks)
  • src/Appwrite/SDK/Specification/Format.php (1 hunks)
  • src/Appwrite/SDK/Specification/Format/OpenAPI3.php (7 hunks)
  • src/Appwrite/SDK/Specification/Format/Swagger2.php (7 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-05T15:30:59.312Z
Learnt from: ArnabChatterjee20k
Repo: appwrite/appwrite PR: 10443
File: src/Appwrite/SDK/Specification/Format/OpenAPI3.php:450-458
Timestamp: 2025-09-05T15:30:59.312Z
Learning: In OpenAPI 3.0.x, using oneOf: [{'type': 'array'}] for array items is the correct approach for spatial data validation, as it ensures each element is specifically an array type. Using new \stdClass() or empty objects {} for items can cause compatibility issues with OpenAPI 3.0.x specification.

Applied to files:

  • src/Appwrite/SDK/Specification/Format/Swagger2.php
  • src/Appwrite/SDK/Specification/Format/OpenAPI3.php
🧬 Code graph analysis (3)
src/Appwrite/SDK/Specification/Format/Swagger2.php (2)
src/Appwrite/Template/Template.php (2)
  • Template (8-178)
  • fromCamelCaseToSnake (156-165)
src/Appwrite/SDK/Specification/Format.php (2)
  • getRequestEnumName (115-469)
  • getRequestEnumKeys (471-562)
src/Appwrite/SDK/Specification/Format/OpenAPI3.php (3)
src/Appwrite/GraphQL/Types/Mapper.php (1)
  • param (255-363)
src/Appwrite/Template/Template.php (2)
  • Template (8-178)
  • fromCamelCaseToSnake (156-165)
src/Appwrite/SDK/Specification/Format.php (2)
  • getRequestEnumName (115-469)
  • getRequestEnumKeys (471-562)
app/controllers/api/avatars.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 (10)
src/Appwrite/SDK/Specification/Format.php (1)

174-179: LGTM!

The new getScreenshot case correctly maps the permissions parameter to the BrowserPermission enum, following the established pattern for request enum name mappings in this file.

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

442-445: LGTM!

Adding Utopia\Validator\WhiteList to the subclass switch allows proper handling of array-wrapped whitelist validators, enabling correct enum generation for array parameters like permissions.


514-516: Consistent conditional example handling.

For ArrayList, the conditional !empty($param['example']) pattern correctly avoids overwriting with null/empty values while preserving explicit examples.

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

447-450: LGTM!

Adding WhiteList to the subclass switch enables proper array-wrapped whitelist handling, consistent with OpenAPI3.php changes.


593-641: LGTM with optional refactor note.

The WhiteList handling correctly differentiates between array and non-array cases, properly assigns enum metadata, and handles integer formatting. The blacklist check duplication could be extracted (same suggestion as OpenAPI3.php).

app/controllers/api/avatars.php (5)

665-684: Well-structured parameter definitions.

The new parameters are thoroughly documented with validators, examples, and appropriate defaults. The use of Range validators with Range::TYPE_FLOAT for scale/coordinates and WhiteList for theme/timezone provides good input validation.


703-712: Defensive headers handling.

The indexed array check and stdClass conversion ensure proper JSON serialization ({} vs []), correctly handling edge cases from the Assoc validator.


750-757: Verify: Geolocation at (0, 0) coordinates.

The condition $latitude != 0 || $longitude != 0 means the exact coordinates (0, 0) — a valid point in the Gulf of Guinea — cannot be explicitly set. While likely intentional to avoid sending defaults, consider using a separate flag if this edge case matters.


720-720: LGTM!

The sleep conversion from seconds to milliseconds is correct. With a max sleep of 10 seconds and a 30-second client timeout, there's adequate headroom for the screenshot capture.


787-803: Calling crop(0, 0) when width and height are both zero is unnecessary and potentially problematic.

The needsProcessing condition on line 788 evaluates to true even when both width and height are 0, as long as quality !== -1 or output is not empty. This causes line 793 to execute $image->crop(0, 0), which is semantically incorrect—cropping to 0x0 dimensions has no meaningful effect and wastes processing.

Consider adding an explicit dimension check in the condition to prevent crop from being called with invalid dimensions, or add a guard within the processing block to skip the crop operation when both dimensions are zero:

$needsProcessing = ($width > 0 || $height > 0) || $quality !== -1 || !empty($output);

if ($needsProcessing) {
    $image = new Image($screenshot);
    
    if ($width > 0 || $height > 0) {
        $image->crop($width, $height);
    }
    
    $output = $output ?: 'png';
    $resizedScreenshot = $image->output($output, $quality);
    unset($image);

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: 1

🧹 Nitpick comments (1)
src/Appwrite/SDK/Specification/Format/Swagger2.php (1)

605-632: Consider extracting blacklist check logic.

The blacklist iteration is duplicated between array (lines 606-612) and non-array (lines 626-632) branches. This could be extracted into a helper method.

Example extraction:

private function isParameterBlacklisted(string $namespace, string $methodName, string $name): bool
{
    foreach ($this->enumBlacklist as $blacklist) {
        if ($blacklist['namespace'] == $namespace && $blacklist['method'] == $methodName && $blacklist['parameter'] == $name) {
            return true;
        }
    }
    return false;
}
📜 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 0c114b8 and 91a1e4c.

📒 Files selected for processing (1)
  • src/Appwrite/SDK/Specification/Format/Swagger2.php (7 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-05T15:30:59.312Z
Learnt from: ArnabChatterjee20k
Repo: appwrite/appwrite PR: 10443
File: src/Appwrite/SDK/Specification/Format/OpenAPI3.php:450-458
Timestamp: 2025-09-05T15:30:59.312Z
Learning: In OpenAPI 3.0.x, using oneOf: [{'type': 'array'}] for array items is the correct approach for spatial data validation, as it ensures each element is specifically an array type. Using new \stdClass() or empty objects {} for items can cause compatibility issues with OpenAPI 3.0.x specification.

Applied to files:

  • src/Appwrite/SDK/Specification/Format/Swagger2.php
🧬 Code graph analysis (1)
src/Appwrite/SDK/Specification/Format/Swagger2.php (2)
src/Appwrite/Template/Template.php (2)
  • Template (8-178)
  • fromCamelCaseToSnake (156-165)
src/Appwrite/SDK/Specification/Format.php (2)
  • getRequestEnumName (115-469)
  • getRequestEnumKeys (471-562)
⏰ 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). (19)
  • GitHub Check: E2E Service Test (Webhooks)
  • GitHub Check: E2E Service Test (VCS)
  • GitHub Check: E2E Service Test (Tokens)
  • GitHub Check: E2E Service Test (Projects)
  • GitHub Check: E2E Service Test (Teams)
  • GitHub Check: E2E Service Test (Proxy)
  • GitHub Check: E2E Service Test (Databases/TablesDB)
  • GitHub Check: E2E Service Test (Realtime)
  • GitHub Check: E2E Service Test (FunctionsSchedule)
  • GitHub Check: E2E Service Test (Functions)
  • GitHub Check: E2E Service Test (Avatars)
  • GitHub Check: E2E Service Test (Databases/Legacy)
  • GitHub Check: E2E Service Test (Account)
  • GitHub Check: E2E Service Test (Site Screenshots)
  • GitHub Check: E2E Service Test (Dev Keys)
  • GitHub Check: E2E General Test
  • GitHub Check: Unit Test
  • GitHub Check: Setup & Build SDK
  • GitHub Check: scan
🔇 Additional comments (7)
src/Appwrite/SDK/Specification/Format/Swagger2.php (7)

446-450: LGTM!

Adding WhiteList to the array subclass switch correctly enables the downstream WhiteList case to handle array-wrapped validators.


454-500: Consistent x-example pattern looks good.

The ($param['example'] ?? '') ?: <default> pattern correctly prioritizes per-parameter examples while preserving backward-compatible defaults across all these validator types.


501-511: LGTM!

Conditionally setting x-example only when provided is appropriate for ArrayList since there's no sensible universal default for array contents.


539-570: LGTM!

The example preference pattern is consistently applied with appropriate defaults for each validator type.


571-591: LGTM!

Conditionally setting x-example for numeric and length validators is appropriate given there's no universal default.


643-646: LGTM!

Consistent application of the example preference pattern.


662-685: LGTM!

The Operation case correctly defers to param['example'] when provided, and the default case appropriately avoids generating placeholder examples.

@abnegate abnegate merged commit bc50835 into 1.8.x Dec 5, 2025
43 checks passed
@abnegate abnegate deleted the release-sdks-4 branch December 5, 2025 04:46
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.

3 participants