From 43a5786c926000358fff53070e9ceb6a27b0664f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Luk=C3=A1=C5=A1?= Date: Sat, 2 Mar 2024 15:55:42 +0100 Subject: [PATCH] Changed imports a bit to stop closer match project style --- src/utils/getOpenApiSpec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/getOpenApiSpec.ts b/src/utils/getOpenApiSpec.ts index 265b8db0..3fb33f44 100644 --- a/src/utils/getOpenApiSpec.ts +++ b/src/utils/getOpenApiSpec.ts @@ -1,6 +1,7 @@ import RefParser from '@apidevtools/json-schema-ref-parser'; -import { exists } from 'fs-extra'; -import path from 'path'; +import { resolve } from 'path'; + +import { exists } from './fileSystem'; /** * Load and parse te open api spec. If the file extension is ".yml" or ".yaml" @@ -9,6 +10,6 @@ import path from 'path'; * @param location: Path or url */ export const getOpenApiSpec = async (location: string): Promise => { - const absolutePathOrUrl = (await exists(location)) ? path.resolve(location) : location; + const absolutePathOrUrl = (await exists(location)) ? resolve(location) : location; return await RefParser.bundle(absolutePathOrUrl, absolutePathOrUrl, {}); };