Skip to content

Commit 5a7c588

Browse files
committed
- Fixed bundle when loading from url and resolving relative paths
1 parent 2070f95 commit 5a7c588

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openapi-typescript-codegen",
3-
"version": "0.11.4",
3+
"version": "0.11.5",
44
"description": "Library that generates Typescript clients based on the OpenAPI specification.",
55
"author": "Ferdi Koomen",
66
"homepage": "https://github.com/ferdikoomen/openapi-typescript-codegen",

src/utils/getOpenApiSpec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import RefParser from 'json-schema-ref-parser';
44
* Load and parse te open api spec. If the file extension is ".yml" or ".yaml"
55
* we will try to parse the file as a YAML spec, otherwise we will fallback
66
* on parsing the file as JSON.
7-
* @param input
7+
* @param ___location: Path or url
88
*/
9-
export async function getOpenApiSpec(input: string): Promise<any> {
10-
return await RefParser.bundle(input);
9+
export async function getOpenApiSpec(___location: string): Promise<any> {
10+
return await RefParser.bundle(___location, ___location, {});
1111
}

0 commit comments

Comments
 (0)