Add project path auth scheme to specs by ChiragAgg5k · Pull Request #12554 · appwrite/appwrite · GitHub
Skip to content

Add project path auth scheme to specs - #12554

Merged
ChiragAgg5k merged 1 commit into
1.9.xfrom
codex/project-path-security
Jun 9, 2026
Merged

Add project path auth scheme to specs#12554
ChiragAgg5k merged 1 commit into
1.9.xfrom
codex/project-path-security

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

What does this PR do?

Adds a ProjectPath auth scheme for generated API specs so endpoints can declare that the SDK client project config should be injected into a path parameter such as {project_id}.

This also removes the old ProjectQuery scheme and preserves existing x-appwrite metadata when adding demo values to Swagger 2 and OpenAPI 3 security schemes.

Test Plan

  • php -l src/Appwrite/Platform/Tasks/Specs.php
  • php -l src/Appwrite/SDK/Specification/Format/Swagger2.php
  • php -l src/Appwrite/SDK/Specification/Format/OpenAPI3.php
  • Verified from the Cloud repo with the patched vendor dependency that OAuth2 specs now emit /oauth2/{project_id}/..., use ProjectPath, and no longer include ProjectQuery.

Related PRs and Issues

  • #XXXX

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Comment thread src/Appwrite/Platform/Tasks/Specs.php
Comment thread src/Appwrite/Platform/Tasks/Specs.php Outdated
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

✨ Benchmark results

Comparing 1.9.x (before) to codex/project-path-security (after).

Before

Scenario P50 (ms) P95 (ms) Requests RPS
API total 13.86 119.37 185 36.4
Account 25.42 145.72 35 7.56
TablesDB 12.89 19.04 35 9.18
Storage 11.84 52.28 75 19.26
Functions 21.16 29.31 40 10.51

After

Scenario P50 (ms) P95 (ms) Requests RPS
API total 14.05 118.96 185 35.26
Account 29.66 171.84 35 7.36
TablesDB 13.47 24.4 35 8.84
Storage 12.21 50.2 75 18.5
Functions 20.63 31.1 40 9.96

Delta

Scenario P95 delta (ms)
API total -0.4
Account +26.12
TablesDB +5.36
Storage -2.08
Functions +1.79
Top API waits
API request Max wait (ms)
account.sessions.email.create 666.82
account.create 171.71
account.password.update 154.61

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

🔄 PHP-Retry Summary

Flaky tests detected across commits:

Commit 5c2eb58 - 2 flaky tests
Test Retries Total Time Details
UsageTest::testSitesStats 1 50.19s Logs
LegacyCustomServerTest::testOneToManyRelationship 1 241.26s Logs
Commit c03b875 - 1 flaky test
Test Retries Total Time Details
TablesDBCustomClientTest::testTimeout 1 130.75s Logs

@ChiragAgg5k
ChiragAgg5k force-pushed the codex/project-path-security branch from 5c2eb58 to c03b875 Compare June 9, 2026 13:04
@ChiragAgg5k
ChiragAgg5k merged commit 0848175 into 1.9.x Jun 9, 2026
44 of 46 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the codex/project-path-security branch June 9, 2026 13:22
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