diff --git a/src/JsonSchema/TypeFactory.php b/src/JsonSchema/TypeFactory.php index 608e349d400..66d6cc37fb7 100644 --- a/src/JsonSchema/TypeFactory.php +++ b/src/JsonSchema/TypeFactory.php @@ -119,7 +119,7 @@ private function getClassType(?string $className, bool $nullable, string $format if (!$this->isResourceClass($className) && is_a($className, \BackedEnum::class, true)) { $enumCases = array_map(static fn (\BackedEnum $enum): string|int => $enum->value, $className::cases()); - $type = \is_string($enumCases[0] ?? '') ? 'string' : 'int'; + $type = \is_string($enumCases[0] ?? '') ? 'string' : 'integer'; if ($nullable) { $enumCases[] = null;