@opra/http 1.28.1 → 1.28.3

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.
Files changed (2) hide show
  1. package/http-handler.js +4 -1
  2. package/package.json +4 -4
package/http-handler.js CHANGED
@@ -258,7 +258,10 @@ export class HttpHandler {
258
258
  for (const prm of paramsLeft) {
259
259
  key = String(prm.name);
260
260
  // Throw error for required parameters
261
- if (prm.required) {
261
+ if (prm.default !== undefined && typeof prm.name === 'string') {
262
+ context.queryParams[prm.name] = prm.default;
263
+ }
264
+ else if (prm.required) {
262
265
  const decode = getDecoder(prm);
263
266
  decode(undefined, { coerce: true, label: String(prm.name), onFail });
264
267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/http",
3
- "version": "1.28.1",
3
+ "version": "1.28.3",
4
4
  "description": "Opra Http Server Adapter",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -33,13 +33,13 @@
33
33
  "toml": "^4.1.1",
34
34
  "tslib": "^2.8.1",
35
35
  "uid": "^2.0.2",
36
- "valgen": "^6.1.0",
36
+ "valgen": "^6.2.0",
37
37
  "vary": "^1.1.2",
38
38
  "yaml": "^2.9.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@opra/common": "^1.28.1",
42
- "@opra/core": "^1.28.1"
41
+ "@opra/common": "^1.28.3",
42
+ "@opra/core": "^1.28.3"
43
43
  },
44
44
  "optionalDependencies": {
45
45
  "express": "^4.0.0 || ^5.0.0",