Repository navigation
feat(specs): replace optional security extension with alternatives - #13543
Merged
Merged
Conversation
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
ChiragAgg5k
marked this pull request as ready for review
September 8, 2026 18:54
Contributor
loks0n
approved these changes
Sep 9, 2026
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner-approved scope deferral
The owner approved deferring the remaining pre-existing schema issues and continuing this migration. Strict full-document validation still fails on the documented custom-array schemas; that failure is deferred, not fixed or passing. No additional schema-cleanup work is included in this rollout.
Proceed with the optional-security migration's review/CI and coordinated producer → Cloud/specs → generator release steps. Keep the temporary producer dependency pin and SDK compatibility/release sequencing explicit; this deferral is not approval to disable checks or merge unrelated fixes.
Latest verification — includes enum-default fix #13545 (now merged)
Cloud head
12abbfeab6fd35ddccb669cd43cf8d55eb407068locks producer integration commite36198300f0efe854d442526253ae2b7eab2c2fb, which includes #13545's code.eb9761f869119e57c2f01e3eca3ec12e5bcda9e87ec5bfc8f6750bc4190d1001.[] is not of type 'string'. The same failure category exists in the published document.resourceon authorize GET/POST, device authorization, PAR, and token; WAFconditionson bypass, challenge, deny, rate-limit, and redirect creation. Their source validators declare arrays (Multiple(..., TYPE_ARRAY)and WAFConditions), but the producer's fallback maps them to string. Removing defaults alone would hide the underlying type mismatch.No PRs merged by this verification, no spec publication or deployment. The release gate remains blocked on these custom-array schema mappings and the previously listed SDK compatibility checks. Earlier sections below are historical evidence.
Latest verification — includes merged #13544
Producer #13543 now includes main through
f66db6e969(merged object-default fix); heade4d63346abff7a70f04c820862b2d285e66b2595. Cloud #5716 locks that producer commit at Cloud head6f68bc428.composer validate --no-check-publishpasses; only the server-ce lock reference changed.a5fad5d320ab9592181451b7c479f5d85f603f6d895a829f353374fea81694bb.[]to{}, with no other parsed differences. The optional-security migration is unchanged.openapi-spec-validatornow gets past the empty-object-default failure but fails on screenshottimezone:GET /avatars/screenshots, parameter index 9, hasdefault: ""outside its titledoneOftimezone enum. This field is unchanged from the previous artifact. Full spec validation remains blocked, not passing.Summary
Part of CLO-4377: replace security-scheme
x-appwrite.optionalwith standard security alternatives.x-appwrite.authexample configuration.optionalfrom the three impersonation scheme definitions on all platforms. Keep the definitions; do not introduce operation references for Email/Phone.The current producer emits OpenAPI 3 only; there is no Swagger 2 emitter here to update.
Coordination / rollout
Companion generator PR: appwrite/sdk-generator#1891.
The generator uses the standard-security methods released in utopia-php/openapi#11, version 0.2.2. API security remains separate from platform-specific SDK example configuration.
Keep this draft until genuine Cloud generation and structural/output baseline comparisons are complete. Promote the producer and publish canonical
2.0.x/latestbefore releasing the generator that removes legacy handling. Also verify the deployed generator against the replacement specs before publication. No specs publishing, Cloud promotion, or releases were performed.Verification
vendor/bin/phpunit tests/unit/SDK/Specification/FormatTest.php— passed: 37 tests, 204 assertions.vendor/bin/pint --test src/Appwrite/Platform/Tasks/Specs.php src/Appwrite/SDK/Method.php src/Appwrite/SDK/Specification/Format/OpenAPI3.php tests/unit/SDK/Specification/FormatTest.php— passed.git diff --check— passed.Tests exercise the producer formatter with real route/SDK metadata, including optional location auth on all platforms and unchanged single-alternative non-location auth. The companion generator's PHP mock-API e2e passes, but that is not Appwrite authentication runtime verification.
Cloud workflow verification
Cloud #5716 pins this producer branch. Non-publishing specs runs passed for 2.0.x and latest. A controlled parent-commit run isolates the migration from current-main drift.
Against that genuine baseline, the only parsed differences are the 3 scheme
optionalremovals and 16 security-array replacements (including Cloud invoice download/view). Both versions produce identical bytes, SHA2565454c86362e1ee39d0eaa0d1f1282d965b334041824bc047336fe262a6c27740; 1,022 operations, 77 aliases, 16 schemes. PHP client/server/console full generated trees match old-generator/old-spec versus new-generator/new-spec.Remaining: strict OpenAPI validation fails on an object schema with
default: [], identically in the published spec. Current generation also has independent OAuth/DNS changes versus the published 1,020-operation spec; those require publication review. Cross-language parity, deployed-generator compatibility, Appwrite impersonation runtime e2e, and full-project static analysis remain incomplete. No screenshots apply to these nonvisual changes.