From 55d3af2f598e62097a568e11fe1fb4b01780a76b Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Fri, 5 Jun 2026 14:50:54 +0530 Subject: [PATCH] style: add brief comment to LOCATION impersonation block --- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 1 + src/Appwrite/SDK/Specification/Format/Swagger2.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 8e8d5e6301..b852a72658 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -385,6 +385,7 @@ class OpenAPI3 extends Format $temp['x-appwrite']['auth'] = array_slice($securities, 0, $this->authCount); + // Impersonation falls back to query params for location-type methods (browsers can't set headers on resource URLs) if ($sdk->getType() === MethodType::LOCATION) { foreach (['ImpersonateUserId', 'ImpersonateUserEmail', 'ImpersonateUserPhone'] as $key) { if (\array_key_exists($key, $this->keys)) { diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 7fc23b0d99..31e5e5de07 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -375,6 +375,7 @@ class Swagger2 extends Format $temp['x-appwrite']['auth'] = \array_slice($securities, 0, $this->authCount); + // Impersonation falls back to query params for location-type methods (browsers can't set headers on resource URLs) if ($sdk->getType() === MethodType::LOCATION) { foreach (['ImpersonateUserId', 'ImpersonateUserEmail', 'ImpersonateUserPhone'] as $key) { if (\array_key_exists($key, $this->keys)) {