From 80d04d8bd7e8ea09d2cb9767df52e4c040068f78 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Mon, 24 Oct 2022 13:03:25 +0200 Subject: [PATCH] ensure date time interface is described as expected --- ModelDescriber/JMSModelDescriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModelDescriber/JMSModelDescriber.php b/ModelDescriber/JMSModelDescriber.php index 8961a4cd9..6111f9fbd 100644 --- a/ModelDescriber/JMSModelDescriber.php +++ b/ModelDescriber/JMSModelDescriber.php @@ -278,7 +278,7 @@ public function describeItem(array $type, OA\Schema $property, Context $context) } elseif (in_array($type['name'], ['double', 'float'], true)) { $property->type = 'number'; $property->format = $type['name']; - } elseif (is_subclass_of($type['name'], \DateTimeInterface::class)) { + } elseif (is_a($type['name'], \DateTimeInterface::class, true)) { $property->type = 'string'; $property->format = 'date-time'; } else {