Skip to content

Commit

Permalink
Merge pull request #106 from RonasIT/extend-primitive-types
Browse files Browse the repository at this point in the history
feat: extends primitive types by date, double, and object
  • Loading branch information
DenTray authored Oct 12, 2023
2 parents 1a570f1 + 166f5a0 commit dc7637a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Validators/SwaggerSpecValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class SwaggerSpecValidator
'integer',
'number',
'string',
'object',
'date',
'double',
];

public const REQUIRED_FIELDS = [
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit dc7637a

Please sign in to comment.