From 599efaaa285f22ab2270ccc83812a6856ad3eaf6 Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Sat, 21 Sep 2024 23:45:25 +0200 Subject: [PATCH] add empty check --- src/Parser/TypeAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parser/TypeAPI.php b/src/Parser/TypeAPI.php index fe020a3..22985e0 100644 --- a/src/Parser/TypeAPI.php +++ b/src/Parser/TypeAPI.php @@ -263,7 +263,7 @@ private function parseResponse(\stdClass $data): Operation\Response } $contentType = $data->contentType ?? null; - if (is_string($contentType)) { + if (is_string($contentType) && !empty($contentType)) { $type = ContentType::from($contentType); } else { $schema = $data->schema ?? null;