From 166f5a0da1c0ee1ab10e91586bee0b9a5b2b5e0e Mon Sep 17 00:00:00 2001 From: Vitaly Iskrin Date: Thu, 12 Oct 2023 00:53:38 -0500 Subject: [PATCH] feat: extends primitive types by date, double, and object --- src/Validators/SwaggerSpecValidator.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Validators/SwaggerSpecValidator.php b/src/Validators/SwaggerSpecValidator.php index 3fd48ca..86df624 100644 --- a/src/Validators/SwaggerSpecValidator.php +++ b/src/Validators/SwaggerSpecValidator.php @@ -42,6 +42,9 @@ class SwaggerSpecValidator 'integer', 'number', 'string', + 'object', + 'date', + 'double', ]; public const REQUIRED_FIELDS = [ @@ -316,7 +319,7 @@ protected function validateParameterType(array $param, array $operation, string break; default: $requiredFields = ['type']; - $validTypes = array_merge(self::PRIMITIVE_TYPES, ['object']); + $validTypes = self::PRIMITIVE_TYPES; } $this->validateFieldsPresent($requiredFields, $paramId);