From 443740f66245daa6fc6f5ed0a4bf6ebd30973263 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 17 Jan 2024 16:28:34 +0100 Subject: [PATCH] fix(schemas): Make sure schemas are always a dictionary Signed-off-by: Joas Schilling --- generate-spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generate-spec b/generate-spec index b6ba981..19971c0 100755 --- a/generate-spec +++ b/generate-spec @@ -842,6 +842,10 @@ foreach ($scopePaths as $scope => $paths) { $scopedSchemas['PublicCapabilities'] = $schemas['PublicCapabilities']; } + if (count($scopedSchemas) === 0) { + $scopedSchemas = new \stdClass(); + } + $openapiScope['components']['schemas'] = $scopedSchemas; }