src/OpenApi/OpenApiSchema.php 1 location
|
@@ 98-100 (lines=3) @@
|
| 95 |
|
{ |
| 96 |
|
$nameParts = explode('/', $name); |
| 97 |
|
|
| 98 |
|
if (count($nameParts) < 4 || $nameParts[0] !== '#') { |
| 99 |
|
throw new InvalidDefinitionException('Invalid Component'); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]][$nameParts[3]])) { |
| 103 |
|
throw new DefinitionNotFoundException("Component'$name' not found"); |
src/Swagger/SwaggerSchema.php 1 location
|
@@ 73-75 (lines=3) @@
|
| 70 |
|
{ |
| 71 |
|
$nameParts = explode('/', $name); |
| 72 |
|
|
| 73 |
|
if (count($nameParts) < 3 || $nameParts[0] !== '#') { |
| 74 |
|
throw new InvalidDefinitionException('Invalid Definition'); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
if (!isset($this->jsonFile[$nameParts[1]][$nameParts[2]])) { |
| 78 |
|
throw new DefinitionNotFoundException("Definition '$name' not found"); |