From e1405ef4ab46425b35438a73b60b1e180427a5c8 Mon Sep 17 00:00:00 2001 From: Djordy Koert Date: Thu, 11 Jan 2024 23:11:40 +0100 Subject: [PATCH] fix-2187: Check if schema is available (#2188) * Update NullablePropertyProcessor.php Check if default is set * style fix --- Processor/NullablePropertyProcessor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Processor/NullablePropertyProcessor.php b/Processor/NullablePropertyProcessor.php index 097123e71..6f8c401e1 100644 --- a/Processor/NullablePropertyProcessor.php +++ b/Processor/NullablePropertyProcessor.php @@ -16,6 +16,10 @@ final class NullablePropertyProcessor implements ProcessorInterface { public function __invoke(Analysis $analysis): void { + if (Generator::isDefault($analysis->openapi->components) || Generator::isDefault($analysis->openapi->components->schemas)) { + return; + } + /** @var OA\Schema[] $schemas */ $schemas = $analysis->openapi->components->schemas;