From 3caedcef6e281e3afdbe9bdb28dec9042be04e68 Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Sun, 3 Sep 2023 22:27:36 +0200 Subject: [PATCH] detect also only typeschema files --- src/Parser/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parser/File.php b/src/Parser/File.php index 020bfb5..dd12d94 100644 --- a/src/Parser/File.php +++ b/src/Parser/File.php @@ -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);