diff --git a/src/OpenApiType.php b/src/OpenApiType.php index 63ce147..b1a3ff8 100644 --- a/src/OpenApiType.php +++ b/src/OpenApiType.php @@ -210,6 +210,8 @@ public static function resolve(string $context, array $definitions, ParamTagValu $properties[$name] = $type; if (!$item->optional) { $required[] = $name; + } elseif ($type->nullable) { + Logger::warning($context, 'Property "' . $name . '" is both nullable and not required. Please consider only using one of these at once.'); } } return new OpenApiType(