File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
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' ;
4
5
5
6
/**
6
7
* Load and parse te open api spec. If the file extension is ".yml" or ".yaml"
@@ -9,6 +10,6 @@ import path from 'path';
9
10
* @param ___location: Path or url
10
11
*/
11
12
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 ;
13
14
return await RefParser . bundle ( absolutePathOrUrl , absolutePathOrUrl , { } ) ;
14
15
} ;
You can’t perform that action at this time.
0 commit comments