diff --git a/packages/orval/src/import-specs.ts b/packages/orval/src/import-specs.ts index 0458aa50e..ee10b90a2 100644 --- a/packages/orval/src/import-specs.ts +++ b/packages/orval/src/import-specs.ts @@ -35,16 +35,8 @@ const resolveSpecs = async ( } } - const data = (await SwaggerParser.resolve(path, options)).values(); - - if (isUrl) { - return data; - } - - // normalizing slashes after SwaggerParser - return Object.fromEntries( - Object.entries(data).map(([key, value]) => [upath.resolve(key), value]), - ); + const data = await SwaggerParser.dereference(path, options); + return { [path]: data }; } catch { const file = await fs.readFile(path, 'utf8');