Skip to content

Commit 76e5920

Browse files
committed
docs: update CHANGELOG; chore: lint index.js
1 parent 9af7d5d commit 76e5920

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

CHANGELOG.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# next release
22

33
BREAKING_CHANGE: change swagger-typescript-api NodeJS "generateApi" function return type
4-
internal: remove redundant internal scripts
4+
BREAKING_CHANGE: remove `rawModelTypes` from output api configuration
5+
feat: `--custom-config <string>` option (#503)
6+
feat: `--sort-routes` option, ability to sort routes;
57
fix: critical bugs based with extract types and enums
68
fix: sort types option (sort was not correctly work with nested or extracted types)
79
fix: problems based with extracting enums;
8-
feat: ability to sort routes;
910
chore: refactoring the axios imports
1011
fix: non-object custom spec extensions (#500)
11-
internal: change process with using custom templates
1212
fix(docs): input instead of output in readme
13-
BREAKING_CHANGE: remove `rawModelTypes` from output api configuration
13+
internal: remove redundant internal scripts
14+
internal: change process with using custom templates
1415

1516
```diff
1617
interface GenerateApiOutput {

index.js

+10-9
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ const program = cli({
239239
default: codeGenBaseConfig.sortRoutes,
240240
},
241241
{
242-
flags: "--custom-config <string>",
243-
description: "custom config: primitiveTypeConstructs, hooks, ... ",
242+
flags: '--custom-config <string>',
243+
description: 'custom config: primitiveTypeConstructs, hooks, ... ',
244244
default: '',
245-
}
245+
},
246246
],
247247
});
248248

@@ -297,14 +297,16 @@ program.addCommand({
297297
const main = async () => {
298298
const { command, options } = await program.execute({ args: process.argv });
299299

300-
let customConfig = null
300+
let customConfig = null;
301301

302302
if (options.customConfig) {
303303
try {
304-
const customConfigPath = resolve(process.cwd(), options.customConfig)
305-
console.log(`✨ found custom config at: ${customConfigPath}`)
306-
customConfig = require(customConfigPath)
307-
} catch (e) {}
304+
const customConfigPath = resolve(process.cwd(), options.customConfig);
305+
console.log(`✨ found custom config at: ${customConfigPath}`);
306+
customConfig = require(customConfigPath);
307+
} catch (e) {
308+
/* empty */
309+
}
308310
}
309311

310312
try {
@@ -317,7 +319,6 @@ const main = async () => {
317319
generateRouteTypes: options.routeTypes,
318320
generateClient: !!(options.axios || options.client),
319321
httpClientType: options.axios ? HTTP_CLIENT.AXIOS : HTTP_CLIENT.FETCH,
320-
url: options.path,
321322
input: resolve(process.cwd(), options.path),
322323
output: resolve(process.cwd(), options.output || '.'),
323324
...customConfig,

0 commit comments

Comments
 (0)