diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php b/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php index e49ace4486..c0098dca3a 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Frameworks/XList.php @@ -79,9 +79,19 @@ class XList extends Base } } + // Response models only filter nested Documents. Handing over the raw config arrays + // ships every key they carry, including the start, bundle and env commands that + // belong to the runtime image. + $frameworks = \array_map(fn (array $framework) => new Document(\array_replace($framework, [ + 'adapters' => \array_map( + fn (array $adapter) => new Document($adapter), + $framework['adapters'] ?? [] + ), + ])), \array_values($frameworks)); + $response->dynamic(new Document([ 'total' => count($frameworks), - 'frameworks' => \array_values($frameworks) + 'frameworks' => $frameworks ]), Response::MODEL_FRAMEWORK_LIST); } }