Skip to content

Commit 69f674a

Browse files
authored
Merge pull request #1069 from yangdan8/patch-1
Fix parameter name to fileName
2 parents 0797349 + c06af2e commit 69f674a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/stupid-walls-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"swagger-typescript-api": patch
3+
---
4+
5+
Fix documentation and type definition to align with actual implementation by renaming `name` to `fileName`.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ import { generateApi, generateTemplates } from "swagger-typescript-api";
8484

8585
/* NOTE: all fields are optional expect one of `input`, `url`, `spec` */
8686
generateApi({
87-
name: "MySuperbApi.ts",
87+
fileName: "MySuperbApi.ts",
8888
// set to `false` to prevent the tool from writing to disk
8989
output: path.resolve(process.cwd(), "./src/__generated__"),
9090
url: "http://api.com/swagger.json",

types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface GenerateApiParamsBase {
99
/**
1010
* default 'api.ts'
1111
*/
12-
name?: string;
12+
fileName?: string;
1313

1414
/**
1515
* name of the main exported class

0 commit comments

Comments
 (0)