Repository navigation
fix(specs): omit invalid timezone and annotated enum defaults - #13545
Merged
Merged
Conversation
Contributor
The production change appears safe, but the implementation-coupled schema assertions violate an explicit repository testing requirement and should be removed before merging.
|
loks0n
approved these changes
Sep 8, 2026
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
This was referenced Sep 8, 2026
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.
Summary
Fix invalid defaults on titled OpenAPI enum schemas, including screenshot
timezonewithdefault: ""despite its timezone enum excluding the empty string.Found by strict validation of genuine Cloud workflow artifacts in Cloud #5716, after the object-default fix in #13544. This is a separate follow-up for CLO-4377, based directly on main rather than the optional-security branch.
The producer's existing default-eligibility check recognized plain
enumanditems.enum, but named enums now use titledoneOfbranches. Extend the enum-default check to evaluateoneOf/anyOfbranches and array items recursively:No route validator, runtime behavior, or API authentication changes. This is an enum-default eligibility check, not a general JSON Schema validator.
Spec change
GET /avatars/screenshots→ optionaltimezonequery parameter. Relevant schema excerpt below; the enum branches are abbreviated. This illustrates the intended change, not a newly generated full Cloud artifact.schema: type: string title: Timezone oneOf: - type: string enum: [africa/abidjan] title: africa/abidjan # ... remaining timezone branches unchanged ... - type: string enum: [utc] title: utc - default: ""The invalid default is omitted—not replaced with
utcor added to the enum. The parameter remains optional, and omission continues to use the browser's default timezone. Valid enum defaults remain unchanged.Verification
vendor/bin/phpunit tests/unit/SDK/Specification/FormatTest.php— passed: 40 tests, 232 assertions.vendor/bin/pint --test src/Appwrite/SDK/Specification/Format.php tests/unit/SDK/Specification/FormatTest.php— passed.composer refactor:check— passed.git diff --check— passed.Not run for this branch: full Cloud spec generation, strict validation of the full resulting document, SDK output comparison, runtime e2e, or full-project static analysis. Further spec validation failures may surface after this one is removed; this PR does not claim the full canonical document is validator-clean. No screenshots apply to this nonvisual formatter change.