@terreno/api 0.8.1 → 0.8.2

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.
@@ -63,12 +63,12 @@ module.exports = function generateDocument(baseDocument, router, basePath) {
63
63
  .filter(function (e) { return e; });
64
64
  if (schema.parameters) {
65
65
  schema.parameters.forEach(function (p) {
66
- if (!params_1.find(function (pp) { return p.name === pp.name; })) {
66
+ if (p.name && !params_1.find(function (pp) { return p.name === pp.name; })) {
67
67
  params_1.push(p);
68
68
  }
69
69
  });
70
70
  }
71
- operation.parameters = params_1;
71
+ operation.parameters = params_1.filter(function (p) { return typeof p.name === 'string' && p.name; });
72
72
  try {
73
73
  path = pathToRegexp.compile(path.replace(/\*|\(\*\)/g, '(.*)'))(keys_1, { encode: function (value) { return value; } });
74
74
  }
package/package.json CHANGED
@@ -100,5 +100,5 @@
100
100
  "updateSnapshot": "bun test --update-snapshots"
101
101
  },
102
102
  "types": "dist/index.d.ts",
103
- "version": "0.8.1"
103
+ "version": "0.8.2"
104
104
  }
@@ -60,13 +60,13 @@ module.exports = function generateDocument (baseDocument, router, basePath) {
60
60
 
61
61
  if (schema.parameters) {
62
62
  schema.parameters.forEach((p) => {
63
- if (!params.find((pp) => p.name === pp.name)) {
63
+ if (p.name && !params.find((pp) => p.name === pp.name)) {
64
64
  params.push(p)
65
65
  }
66
66
  })
67
67
  }
68
68
 
69
- operation.parameters = params
69
+ operation.parameters = params.filter((p) => typeof p.name === 'string' && p.name)
70
70
  try {
71
71
  path = pathToRegexp.compile(path.replace(/\*|\(\*\)/g, '(.*)'))(keys, { encode: (value) => value })
72
72
  } catch (_e) {