Skip to content

Commit 416eb66

Browse files
author
Ben Watkins
authored
document approach to disabling output (#325)
1 parent 24a0cd3 commit 416eb66

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ const fs = require("fs");
9090
/* NOTE: all fields are optional expect one of `output`, `url`, `spec` */
9191
generateApi({
9292
name: "MySuperbApi.ts",
93+
// set to `false` to prevent the tool from writing to disk
9394
output: path.resolve(process.cwd(), "./src/__generated__"),
9495
url: 'http://api.com/swagger.json',
9596
input: path.resolve(process.cwd(), './foo/swagger.json'),

index.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ interface GenerateApiParamsBase {
55
name?: string;
66

77
/**
8-
* path to folder where will been located the created api module
8+
* path to folder where will been located the created api module.
9+
*
10+
* may set to `false` to skip writing content to disk. in this case,
11+
* you may access the `files` on the return value.
912
*/
10-
output?: string;
13+
output?: string | false;
1114

1215
/**
1316
* path to folder containing templates (default: ./src/templates)

0 commit comments

Comments
 (0)