Skip to content

Commit 8397720

Browse files
authored
Merge pull request #96 from yorickgirard/specify-exception-thrown
Add exception in readFromJsonFile
2 parents b33d45e + 4dc7d45 commit 8397720

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Reader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use cebe\openapi\exceptions\IOException;
1111
use cebe\openapi\exceptions\TypeErrorException;
1212
use cebe\openapi\exceptions\UnresolvableReferenceException;
13+
use cebe\openapi\json\InvalidJsonPointerSyntaxException;
1314
use cebe\openapi\json\JsonPointer;
1415
use cebe\openapi\spec\OpenApi;
1516
use Symfony\Component\Yaml\Yaml;
@@ -78,6 +79,7 @@ public static function readFromYaml(string $yaml, string $baseType = OpenApi::cl
7879
* @throws TypeErrorException in case invalid spec data is supplied.
7980
* @throws UnresolvableReferenceException in case references could not be resolved.
8081
* @throws IOException when the file is not readable.
82+
* @throws InvalidJsonPointerSyntaxException in case an invalid JSON pointer string is passed to the spec references.
8183
*/
8284
public static function readFromJsonFile(string $fileName, string $baseType = OpenApi::class, $resolveReferences = true): SpecObjectInterface
8385
{

0 commit comments

Comments
 (0)