src/OpenApi/OpenApiSchema.php 1 location
|
@@ 80-84 (lines=5) @@
|
| 77 |
|
} |
| 78 |
|
$parameter = $this->jsonFile[self::SWAGGER_COMPONENTS][self::SWAGGER_PARAMETERS][$paramParts[3]]; |
| 79 |
|
} |
| 80 |
|
if ($parameter['in'] === $parameterIn && |
| 81 |
|
$parameter['schema']['type'] === "integer" |
| 82 |
|
&& filter_var($arguments[$parameter['name']], FILTER_VALIDATE_INT) === false) { |
| 83 |
|
throw new NotMatchedException('Path expected an integer value'); |
| 84 |
|
} |
| 85 |
|
} |
| 86 |
|
} |
| 87 |
|
|
src/Swagger/SwaggerSchema.php 1 location
|
@@ 55-59 (lines=5) @@
|
| 52 |
|
protected function validateArguments($parameterIn, $parameters, $arguments) |
| 53 |
|
{ |
| 54 |
|
foreach ($parameters as $parameter) { |
| 55 |
|
if ($parameter['in'] === $parameterIn |
| 56 |
|
&& $parameter['type'] === "integer" |
| 57 |
|
&& filter_var($arguments[$parameter['name']], FILTER_VALIDATE_INT) === false) { |
| 58 |
|
throw new NotMatchedException('Path expected an integer value'); |
| 59 |
|
} |
| 60 |
|
} |
| 61 |
|
} |
| 62 |
|
|