@ng-openapi/http-resource 0.0.12 → 0.0.14-pr-22-http-params-builder-e72d48f.0
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/index.cjs +9 -3
- package/index.js +9 -3
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -3158,9 +3158,9 @@ var HttpResourceMethodBodyGenerator = class {
|
|
|
3158
3158
|
return "";
|
|
3159
3159
|
}
|
|
3160
3160
|
const paramMappings = context.queryParams.map((param) => `const ${param.name}Value = typeof ${param.name} === 'function' ? ${param.name}() : ${param.name};
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
}`).join("\n");
|
|
3161
|
+
if (${param.name}Value != null) {
|
|
3162
|
+
params = HttpParamsBuilder.addToHttpParams(params, ${param.name}Value, '${param.name}');
|
|
3163
|
+
}`).join("\n");
|
|
3164
3164
|
return `
|
|
3165
3165
|
let params = new HttpParams();
|
|
3166
3166
|
${paramMappings}`;
|
|
@@ -3560,6 +3560,12 @@ var HttpResourceGenerator = class {
|
|
|
3560
3560
|
clientContextTokenName
|
|
3561
3561
|
],
|
|
3562
3562
|
moduleSpecifier: "../tokens"
|
|
3563
|
+
},
|
|
3564
|
+
{
|
|
3565
|
+
namedImports: [
|
|
3566
|
+
"HttpParamsBuilder"
|
|
3567
|
+
],
|
|
3568
|
+
moduleSpecifier: "../utils"
|
|
3563
3569
|
}
|
|
3564
3570
|
]);
|
|
3565
3571
|
if (usedTypes.size > 0) {
|
package/index.js
CHANGED
|
@@ -3124,9 +3124,9 @@ var HttpResourceMethodBodyGenerator = class {
|
|
|
3124
3124
|
return "";
|
|
3125
3125
|
}
|
|
3126
3126
|
const paramMappings = context.queryParams.map((param) => `const ${param.name}Value = typeof ${param.name} === 'function' ? ${param.name}() : ${param.name};
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
}`).join("\n");
|
|
3127
|
+
if (${param.name}Value != null) {
|
|
3128
|
+
params = HttpParamsBuilder.addToHttpParams(params, ${param.name}Value, '${param.name}');
|
|
3129
|
+
}`).join("\n");
|
|
3130
3130
|
return `
|
|
3131
3131
|
let params = new HttpParams();
|
|
3132
3132
|
${paramMappings}`;
|
|
@@ -3526,6 +3526,12 @@ var HttpResourceGenerator = class {
|
|
|
3526
3526
|
clientContextTokenName
|
|
3527
3527
|
],
|
|
3528
3528
|
moduleSpecifier: "../tokens"
|
|
3529
|
+
},
|
|
3530
|
+
{
|
|
3531
|
+
namedImports: [
|
|
3532
|
+
"HttpParamsBuilder"
|
|
3533
|
+
],
|
|
3534
|
+
moduleSpecifier: "../utils"
|
|
3529
3535
|
}
|
|
3530
3536
|
]);
|
|
3531
3537
|
if (usedTypes.size > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-openapi/http-resource",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14-pr-22-http-params-builder-e72d48f.0",
|
|
4
4
|
"description": "HTTP Resource plugin for ng-openapi - Angular HTTP utilities with caching and state management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"directory": "packages/plugins/http-resource"
|
|
32
32
|
},
|
|
33
33
|
"funding": {
|
|
34
|
-
"type": "
|
|
35
|
-
"url": "https://
|
|
34
|
+
"type": "buymeacoffee",
|
|
35
|
+
"url": "https://buymeacoffee.com/ngopenapi"
|
|
36
36
|
},
|
|
37
37
|
"type": "module",
|
|
38
38
|
"main": "./index.js",
|