Skip to content

Commit

Permalink
detect also only typeschema files
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Sep 3, 2023
1 parent 1d3f8da commit 3caedce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Parser/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function parse(string $schema, ?ContextInterface $context = null): Specif

if (isset($data->paths)) {
$parser = new OpenAPI($this->schemaManager);
} elseif (isset($data->operations)) {
} elseif (isset($data->operations) || isset($data->definitions)) {
$parser = new TypeAPI($this->schemaManager);
} else {
throw new ParserException('Could not detect schema format of the provided source ' . $schema);
Expand Down

0 comments on commit 3caedce

Please sign in to comment.