@gopowerteam/request-generate 0.1.5 → 0.1.6
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/bin/index.js +0 -0
- package/dist/index.js +8 -4
- package/dist/index.mjs +8 -4
- package/package.json +5 -5
package/bin/index.js
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -286,8 +286,10 @@ function parseParametersBody(parameters) {
|
|
|
286
286
|
// src/parse/v2/parse-parameters-path.ts
|
|
287
287
|
function parseParametersPath(parameters) {
|
|
288
288
|
return parameters.reduce((r, p) => {
|
|
289
|
-
if (!("$ref" in p) && p.in === "path"
|
|
290
|
-
const { type, ref, imports, enums } = parseSchemaType(
|
|
289
|
+
if (!("$ref" in p) && p.in === "path") {
|
|
290
|
+
const { type, ref, imports, enums } = parseSchemaType(
|
|
291
|
+
p
|
|
292
|
+
);
|
|
291
293
|
const parameter = new OperationParameter();
|
|
292
294
|
parameter.name = p.name;
|
|
293
295
|
parameter.description = p.description;
|
|
@@ -307,8 +309,10 @@ function parseParametersQuery(parameters) {
|
|
|
307
309
|
var _a, _b;
|
|
308
310
|
const excludeParams = (_b = (_a = Generate.options) == null ? void 0 : _a.exportServices) == null ? void 0 : _b.excludeQueryParams;
|
|
309
311
|
return parameters.reduce((r, p) => {
|
|
310
|
-
if (!("$ref" in p) && p.in === "query" &&
|
|
311
|
-
const { type, ref, imports, enums } = parseSchemaType(
|
|
312
|
+
if (!("$ref" in p) && p.in === "query" && !(excludeParams && excludeParams.includes(p.name.split(".")[0]))) {
|
|
313
|
+
const { type, ref, imports, enums } = parseSchemaType(
|
|
314
|
+
p
|
|
315
|
+
);
|
|
312
316
|
const parameter = new OperationParameter();
|
|
313
317
|
parameter.name = p.name;
|
|
314
318
|
parameter.description = p.description;
|
package/dist/index.mjs
CHANGED
|
@@ -287,8 +287,10 @@ function parseParametersBody(parameters) {
|
|
|
287
287
|
// src/parse/v2/parse-parameters-path.ts
|
|
288
288
|
function parseParametersPath(parameters) {
|
|
289
289
|
return parameters.reduce((r, p) => {
|
|
290
|
-
if (!("$ref" in p) && p.in === "path"
|
|
291
|
-
const { type, ref, imports, enums } = parseSchemaType(
|
|
290
|
+
if (!("$ref" in p) && p.in === "path") {
|
|
291
|
+
const { type, ref, imports, enums } = parseSchemaType(
|
|
292
|
+
p
|
|
293
|
+
);
|
|
292
294
|
const parameter = new OperationParameter();
|
|
293
295
|
parameter.name = p.name;
|
|
294
296
|
parameter.description = p.description;
|
|
@@ -308,8 +310,10 @@ function parseParametersQuery(parameters) {
|
|
|
308
310
|
var _a, _b;
|
|
309
311
|
const excludeParams = (_b = (_a = Generate.options) == null ? void 0 : _a.exportServices) == null ? void 0 : _b.excludeQueryParams;
|
|
310
312
|
return parameters.reduce((r, p) => {
|
|
311
|
-
if (!("$ref" in p) && p.in === "query" &&
|
|
312
|
-
const { type, ref, imports, enums } = parseSchemaType(
|
|
313
|
+
if (!("$ref" in p) && p.in === "query" && !(excludeParams && excludeParams.includes(p.name.split(".")[0]))) {
|
|
314
|
+
const { type, ref, imports, enums } = parseSchemaType(
|
|
315
|
+
p
|
|
316
|
+
);
|
|
313
317
|
const parameter = new OperationParameter();
|
|
314
318
|
parameter.name = p.name;
|
|
315
319
|
parameter.description = p.description;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gopowerteam/request-generate",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -16,9 +16,6 @@
|
|
|
16
16
|
"gopowerteam",
|
|
17
17
|
"request-generate"
|
|
18
18
|
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsup"
|
|
21
|
-
},
|
|
22
19
|
"main": "./dist/index.js",
|
|
23
20
|
"module": "./dist/index.mjs",
|
|
24
21
|
"types": "./dist/index.d.ts",
|
|
@@ -56,5 +53,8 @@
|
|
|
56
53
|
"qs": "^6.11.0",
|
|
57
54
|
"rimraf": "^3.0.2",
|
|
58
55
|
"rxjs": "^7.5.7"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup"
|
|
59
59
|
}
|
|
60
|
-
}
|
|
60
|
+
}
|