Skip to content

refactor(sdks): consume utopia-php/openapi specification models - #13217

Merged
ChiragAgg5k merged 5 commits into
mainfrom
refactor/sdk-generator-utopia-openapi
Aug 14, 2026
Merged

refactor(sdks): consume utopia-php/openapi specification models#13217
ChiragAgg5k merged 5 commits into
mainfrom
refactor/sdk-generator-utopia-openapi

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Aug 14, 2026

Copy link
Copy Markdown
Member

Companion to appwrite/sdk-generator#1789, which removes src/Spec/* and the Appwrite\Spec autoload namespace from the generator in favour of the canonical typed models in utopia-php/openapi.

src/Appwrite/Platform/Tasks/SDKs.php is the caller that constructs those spec objects, so without this change php app/cli.php sdks fatals on the generator branch:

Fatal error: Uncaught Error: Class "Appwrite\Spec\OpenAPI3" not found in src/Appwrite/Platform/Tasks/SDKs.php on line 481

What's Changed

  • new OpenAPI3($spec) becomes Parser::parse($spec).
  • new StaticSpec(title: …, description: …, version: …, licenseName: …, licenseURL: …) becomes Parser::parse([...]) over an equivalent minimal OpenAPI 3 document, matching the static-spec example in the generator's README.
  • Dropped the Appwrite\Spec\OpenAPI3 and Appwrite\Spec\StaticSpec imports, added Utopia\OpenAPI\Parser.
  • Pinned appwrite/sdk-generator to the tagged 3.0.* release. No repository entry needed: utopia-php/openapi resolves from Packagist as 0.1.0.

Verification

Generated every server SDK against open-api3-1.9.x-server.json through appwrite-labs/cloud, which vendors this branch as appwrite/server-ce.

The generator no longer ships Appwrite\Spec; specifications are parsed by
Utopia\OpenAPI\Parser and passed to SDK as canonical typed models.
@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR migrates SDK generation to the canonical utopia-php/openapi parser and upgrades appwrite/sdk-generator to 3.0.

  • Replaces legacy Appwrite\Spec construction with parsed OpenAPI models.
  • Builds static specifications from a minimal OpenAPI 3 document.
  • Updates and locks the generator and parser dependencies.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
composer.json Upgrades the development-only SDK generator dependency from 2.x to 3.x.
composer.lock Locks SDK generator 3.0.0 and its utopia-php/openapi 0.1.0 dependency.
src/Appwrite/Platform/Tasks/SDKs.php Replaces removed legacy specification classes with canonical OpenAPI parser output for static and generated specifications.

Reviews (5): Last reviewed commit: "chore: use a caret constraint for sdk-ge..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → refactor/sdk-generator-utopia-openapi (after).

Metric Before After Change
🚀 Requests/sec 148.39 145.87 -1.7%
⏱️ Latency P50 96.68 ms 99.67 ms +3.1%
⏱️ Latency P95 335.6 ms 335.39 ms -0.1%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 99.67 335.39 9,234 145.87 -0.22
Account 183.43 467.46 486 8.09 -2.61
TablesDB 95.82 313.98 5,022 80.61 +6.12
Storage 88.88 311.84 2,430 41.18 +9.12
Functions 150.18 420.15 1,296 22.51 -5.9

Top API waits (after)

API request Max wait (ms)
functions.runtimes.list 1,002.29
storage.buckets.delete 981.39
functions.variables.delete 884.7
account.name.update 849.01
functions.delete 844.87

@ChiragAgg5k
ChiragAgg5k merged commit fe71b67 into main Aug 14, 2026
44 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the refactor/sdk-generator-utopia-openapi branch August 14, 2026 08:48
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.

2 participants