Repository navigation
feat(sdk): support PDF response content type - #13504
Merged
Merged
Conversation
Contributor
Greptile SummaryAdds an
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness, security, or repository-rule issues identified. The new PDF enum value reaches the existing generic binary schema generation path, and the regression test verifies the complete media-type response map using a supported test pattern. Important Files Changed
Reviews (2): Last reviewed commit: "test: yield binary response data provide..." | Re-trigger Greptile |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
TorstenDittmann
approved these changes
Sep 6, 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.
What does this PR do?
Adds
ContentType::PDF = 'application/pdf'to the SDK metadata enum.PDF endpoints can now declare
contentType: ContentType::PDFwith aResponse::MODEL_NONEresponse. The existing OpenAPI generator emits the precise binary contract:This is needed for Cloud invoice download/view specifications, whose runtime responses are PDFs. Their older PaymentMethod/JSON metadata was masked by the removed
x-appwrite.typeoverride. A genericContentType::ANYis compatible with binary inference, butapplication/pdfis the accurate permanent declaration.This PR only adds the enum value and regression coverage. It does not modify endpoint runtime behavior, Cloud dependency pins, or Cloud invoice declarations. Cloud can adopt
ContentType::PDFafter updating itsserver-cedependency.Tests
string/binaryschema.Undefined constant Appwrite\SDK\ContentType::PDF.vendor/bin/phpunit tests/unit/SDK: 34 tests, 172 assertions passed.composer lint src/Appwrite/SDK/ContentType.php tests/unit/SDK/Specification/FormatTest.php: passed.git diff --check: passed.