From a71652de95dd22cac2c054f5e08275c75f6c212e Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 4 Aug 2026 17:18:41 +0530 Subject: [PATCH] docs(account): drop the sessionId default from its description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sessionId is a path parameter, so #13097 emits it as required and every generated SDK takes it as a mandatory argument. The description still told callers it defaults to 'current', which produced a docstring contradicting its own signature — following it raises a missing-argument error before any request: def get_session(self, session_id: str) -> Session: session_id : str Session ID. Use the string 'current' ... Defaults to 'current'. The 'current' sentinel is unchanged and still documented; only the unreachable default is. --- app/controllers/api/account.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 7f07c7ec4d..7e2b650c6a 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -715,7 +715,7 @@ Http::get('/v1/account/sessions/:sessionId') ], contentType: ContentType::JSON )) - ->param('sessionId', 'current', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Session ID. Use the string \'current\' to get the current device session. Defaults to \'current\'.', true, ['dbForProject']) + ->param('sessionId', 'current', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Session ID. Use the string \'current\' to get the current device session.', true, ['dbForProject']) ->inject('response') ->inject('user') ->inject('locale') @@ -769,7 +769,7 @@ Http::delete('/v1/account/sessions/:sessionId') contentType: ContentType::NONE )) ->label('abuse-limit', 100) - ->param('sessionId', 'current', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Session ID. Use the string \'current\' to delete the current device session. Defaults to \'current\'.', true, ['dbForProject']) + ->param('sessionId', 'current', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Session ID. Use the string \'current\' to delete the current device session.', true, ['dbForProject']) ->inject('requestTimestamp') ->inject('request') ->inject('response') @@ -860,7 +860,7 @@ Http::patch('/v1/account/sessions/:sessionId') contentType: ContentType::JSON )) ->label('abuse-limit', 10) - ->param('sessionId', 'current', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Session ID. Use the string \'current\' to update the current device session. Defaults to \'current\'.', true, ['dbForProject']) + ->param('sessionId', 'current', fn (Database $dbForProject) => new UID($dbForProject->getAdapter()->getMaxUIDLength()), 'Session ID. Use the string \'current\' to update the current device session.', true, ['dbForProject']) ->inject('response') ->inject('user') ->inject('dbForProject')