From 37dbbf226e71e927fa0b2a3b5fcf036a7c89856b Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 6 Feb 2025 10:42:33 +0000 Subject: [PATCH] chore: fix: descContents handling --- src/Appwrite/Specification/Format/OpenAPI3.php | 2 +- src/Appwrite/Specification/Format/Swagger2.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 6785afa868..e60d342b0b 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -178,7 +178,7 @@ class OpenAPI3 extends Format $namespace = $sdk->getNamespace() ?? 'default'; $desc = $desc ?? ''; - $descContents = \str_ends_with($desc, '.md') ? \file_get_contents($desc) : ''; + $descContents = \str_ends_with($desc, '.md') ? \file_get_contents($desc) : $desc; $temp = [ 'summary' => $route->getDesc(), diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 3565b5da75..fae164f0a6 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -174,7 +174,7 @@ class Swagger2 extends Format $namespace = $sdk->getNamespace() ?? 'default'; $desc = $desc ?? ''; - $descContents = \str_ends_with($desc, '.md') ? \file_get_contents($desc) : ''; + $descContents = \str_ends_with($desc, '.md') ? \file_get_contents($desc) : $desc; $temp = [ 'summary' => $route->getDesc(),