openapi-ts-request 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/openapi.js +4 -2
- package/package.json +1 -1
package/dist/bin/openapi.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const commander_1 = require("commander");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
6
7
|
const path_1 = require("path");
|
|
7
8
|
const pkg = tslib_1.__importStar(require("../../package.json"));
|
|
8
9
|
const index_1 = require("../index");
|
|
@@ -46,7 +47,7 @@ function run() {
|
|
|
46
47
|
try {
|
|
47
48
|
const input = getPath(params.input);
|
|
48
49
|
const output = getPath(params.output);
|
|
49
|
-
|
|
50
|
+
const options = {
|
|
50
51
|
schemaPath: input,
|
|
51
52
|
serversPath: output,
|
|
52
53
|
requestLibPath: params.requestLibPath,
|
|
@@ -68,7 +69,8 @@ function run() {
|
|
|
68
69
|
isTranslateToEnglishTag: JSON.parse(params.isTranslateToEnglishTag) === true,
|
|
69
70
|
isOnlyGenTypeScriptType: JSON.parse(params.isOnlyGenTypeScriptType) === true,
|
|
70
71
|
isCamelCase: JSON.parse(params.isCamelCase) === true,
|
|
71
|
-
}
|
|
72
|
+
};
|
|
73
|
+
yield (0, index_1.generateService)((0, lodash_1.pickBy)(options, (value) => value !== null && value !== undefined && value !== ''));
|
|
72
74
|
process.exit(0);
|
|
73
75
|
}
|
|
74
76
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openapi-ts-request",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Swagger2/OpenAPI3/Apifox to TypeScript/JavaScript, request client(support any client), request mock service, enum and enum translation, react-query, type field label, JSON Schemas",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0",
|