mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
- Fixed bundle when loading from url and resolving relative paths
This commit is contained in:
parent
2070f9599f
commit
5a7c58873f
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "openapi-typescript-codegen",
|
||||
"version": "0.11.4",
|
||||
"version": "0.11.5",
|
||||
"description": "Library that generates Typescript clients based on the OpenAPI specification.",
|
||||
"author": "Ferdi Koomen",
|
||||
"homepage": "https://github.com/ferdikoomen/openapi-typescript-codegen",
|
||||
|
||||
@ -4,8 +4,8 @@ import RefParser from 'json-schema-ref-parser';
|
||||
* Load and parse te open api spec. If the file extension is ".yml" or ".yaml"
|
||||
* we will try to parse the file as a YAML spec, otherwise we will fallback
|
||||
* on parsing the file as JSON.
|
||||
* @param input
|
||||
* @param location: Path or url
|
||||
*/
|
||||
export async function getOpenApiSpec(input: string): Promise<any> {
|
||||
return await RefParser.bundle(input);
|
||||
export async function getOpenApiSpec(location: string): Promise<any> {
|
||||
return await RefParser.bundle(location, location, {});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user