Skip to content

Derive SDK method names from operation IDs - #1804

Merged
ChiragAgg5k merged 3 commits into
mainfrom
feat/operation-id-method-names
Aug 17, 2026
Merged

Derive SDK method names from operation IDs#1804
ChiragAgg5k merged 3 commits into
mainfrom
feat/operation-id-method-names

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Summary

  • derive service-local SDK method names from operationId and the matching operation tag
  • assign synthetic service-qualified operation IDs to x-appwrite.methods aliases
  • remove singular x-appwrite.method reads, writes, and E2E fixture fields
accountCreate + account              -> create
databasesListDocuments + databases  -> listDocuments
oauth2Authorize + oauth2            -> authorize

Closes #1790.

Verification

  • Generated every SDK target from current Appwrite 1.9.x client, server, and console specs with singular x-appwrite.method removed
  • Compared each generated tree with an origin/main same-spec baseline; outputs were identical for all three platforms
  • composer refactor:check
  • composer lint-twig
  • vendor/bin/phpunit tests/e2e/PHP83Test.php (1,401 assertions)
  • vendor/bin/phpunit tests/e2e/CLIGo126Test.php (5,407 assertions)
  • Generated CLI: go build ./..., go vet ./..., go test ./..., and gofmt check

@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces x-appwrite.method metadata with service-local method names derived from operation IDs and matching tags.

  • Adds shared operation-ID method-name derivation to the base language class.
  • Assigns service-qualified IDs to aliased operations.
  • Migrates CLI command-surface naming to the shared derivation.
  • Updates the OpenAPI fixture to remove singular method metadata and exercise aliases.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
src/SDK/Language.php Adds the shared longest-matching-tag prefix algorithm for deriving service-local method names.
src/SDK/SDK.php Routes method naming through the language helper and gives aliased operations synthetic service-qualified IDs.
src/SDK/Language/CLI.php Uses the shared derived method name when constructing generated Go SDK calls.
src/SDK/Language/Concern/CliCommandSurface.php Migrates CLI command, helper, fallback, description, and query lookups to shared method-name derivation.
tests/resources/spec-openapi3.json Removes singular method metadata and updates operation IDs and alias metadata to preserve expected generated names.

Reviews (3): Last reviewed commit: "fix: preserve OAuth2 fixture method name" | Re-trigger Greptile

@ChiragAgg5k
ChiragAgg5k merged commit 463353d into main Aug 17, 2026
59 checks passed
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.

🚀 Feature: Replace x-appwrite.method with operationId

1 participant