From 9aef57f3594bb54ac55e37ffa0fa240497449e19 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Fri, 5 Jun 2026 13:43:05 +0530 Subject: [PATCH] feat: add impersonation keys to LOCATION methods in OpenAPI3 spec --- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index dfa38b0bf5..8e8d5e6301 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -384,6 +384,16 @@ class OpenAPI3 extends Format } $temp['x-appwrite']['auth'] = array_slice($securities, 0, $this->authCount); + + if ($sdk->getType() === MethodType::LOCATION) { + foreach (['ImpersonateUserId', 'ImpersonateUserEmail', 'ImpersonateUserPhone'] as $key) { + if (\array_key_exists($key, $this->keys)) { + $securities[$key] = []; + $temp['x-appwrite']['auth'][$key] = []; + } + } + } + $temp['security'][] = $securities; }