Add public visibility control for deprecated methods#10933
Conversation
- Add 'public' parameter to SDK Method class to control documentation visibility - Mark deprecated methods as non-public (public: false) to hide them from docs - Update OpenAPI and Swagger specs to reflect visibility changes - Affected endpoints: account verification, messaging providers, and MFA authenticators
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughThis pull request implements a comprehensive authentication and API infrastructure refactoring. The primary changes include: migrating the authorization system from static Auth class methods to User document-based checks; introducing nullable parameter wrappers and includeTotal flags across multiple API list endpoints; updating database collections with new attributes (emailCanonical, emailIsCanonical, emailIsFree, emailIsDisposable, emailIsCorporate, transformations); adding support for password/token proofs and store-based session management; implementing dark-mode support in email templates; introducing TanStack Start framework support; adding new logging configuration for realtime operations; and updating numerous dependency versions in composer.json. Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas requiring extra attention:
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
Security Scan Results for PRDocker Image Scan Results
Source Code Scan Results🎉 No vulnerabilities found! |
There was a problem hiding this comment.
Pull request overview
This PR introduces a visibility control mechanism for deprecated API methods to hide them from public documentation while maintaining backward compatibility. The implementation adds a public parameter to the Method class and systematically marks deprecated methods across account verification, MFA, messaging providers, and project configuration endpoints as non-public.
Key Changes
- Added
publicproperty with getter/setter methods to theMethodclass (defaults totrue) - Updated OpenAPI 3 and Swagger 2 specification generators to include the
publicfield at both SDK and method levels - Marked 30+ deprecated methods as non-public (
public: false) across account, messaging, projects, and users modules - Updated specification JSON files to reflect the visibility changes for all endpoints
Reviewed changes
Copilot reviewed 19 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Appwrite/SDK/Method.php | Adds public property with default value true, plus isPublic() and setPublic() methods |
| src/Appwrite/SDK/Specification/Format/OpenAPI3.php | Adds public field to SDK info and method metadata in parsed specification |
| src/Appwrite/SDK/Specification/Format/Swagger2.php | Adds public field to SDK info and method metadata in parsed specification |
| src/Appwrite/Platform/Modules/Account/Http/Account/MFA/* | Marks deprecated MFA authenticators, challenges, factors, and recovery codes as non-public |
| app/controllers/api/account.php | Marks deprecated account verification endpoints as non-public |
| app/controllers/api/messaging.php | Marks deprecated SMTP, FCM, APNS provider and SMS endpoints as non-public |
| app/controllers/api/projects.php | Marks deprecated API status and SMTP/SMS template endpoints as non-public |
| app/controllers/api/users.php | Marks deprecated user MFA endpoints as non-public |
| app/config/specs/swagger2-latest-server.json | Updates specification with public fields for all methods and deprecated method visibility |
| app/config/specs/swagger2-latest-console.json | Updates specification with public fields for all methods and deprecated method visibility |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✨ Benchmark results
⚡ Benchmark Comparison
|
Summary
This PR adds a visibility control mechanism for deprecated methods to prevent them from appearing in public documentation while maintaining backward compatibility in the API.
Changes
publicparameter to theMethodclass to control documentation visibilityisPublic()andsetPublic()methods to the Method classpublic: false) across:Test plan