From 45c3bc9424456b90b29f83518c87b2ec9e442c49 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 3 Jun 2021 11:58:59 +0200 Subject: [PATCH] revert(spec): option to include all models --- src/Appwrite/Specification/Format.php | 9 +-------- src/Appwrite/Specification/Format/Swagger2.php | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Appwrite/Specification/Format.php b/src/Appwrite/Specification/Format.php index b61eb7956..f76a4c1a5 100644 --- a/src/Appwrite/Specification/Format.php +++ b/src/Appwrite/Specification/Format.php @@ -27,11 +27,6 @@ abstract class Format * @var Model[] */ protected $models; - - /** - * @var bool - */ - protected $includeUnusedModels; /** * @var array @@ -68,9 +63,8 @@ abstract class Format * @param Model[] $models * @param array $keys * @param int $authCount - * @param bool $includeUnusedModels */ - public function __construct(App $app, array $services, array $routes, array $models, array $keys, int $authCount, bool $includeUnusedModels = false) + public function __construct(App $app, array $services, array $routes, array $models, array $keys, int $authCount) { $this->app = $app; $this->services = $services; @@ -78,7 +72,6 @@ abstract class Format $this->models = $models; $this->keys = $keys; $this->authCount = $authCount; - $this->includeUnusedModels = $includeUnusedModels; } /** diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 54d6e8867..9809220f8 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -364,7 +364,7 @@ class Swagger2 extends Format } } foreach ($this->models as $model) { - if (!$this->includeUnusedModels && !in_array($model->getType(), $usedModels)) { + if (!in_array($model->getType(), $usedModels)) { continue; }