Skip to content

Commit 43a5786

Browse files
committed
Changed imports a bit to stop closer match project style
1 parent 15fa2ac commit 43a5786

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/getOpenApiSpec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import RefParser from '@apidevtools/json-schema-ref-parser';
2-
import { exists } from 'fs-extra';
3-
import path from 'path';
2+
import { resolve } from 'path';
3+
4+
import { exists } from './fileSystem';
45

56
/**
67
* Load and parse te open api spec. If the file extension is ".yml" or ".yaml"
@@ -9,6 +10,6 @@ import path from 'path';
910
* @param location: Path or url
1011
*/
1112
export const getOpenApiSpec = async (location: string): Promise<any> => {
12-
const absolutePathOrUrl = (await exists(location)) ? path.resolve(location) : location;
13+
const absolutePathOrUrl = (await exists(location)) ? resolve(location) : location;
1314
return await RefParser.bundle(absolutePathOrUrl, absolutePathOrUrl, {});
1415
};

0 commit comments

Comments
 (0)