serverless-openapi-documenter 0.0.104 → 0.0.107

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serverless-openapi-documenter",
3
- "version": "0.0.104",
3
+ "version": "0.0.107",
4
4
  "description": "Generate OpenAPI v3 documentation and Postman Collections from your Serverless Config",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -50,17 +50,17 @@
50
50
  "js-yaml": "^4.1.0",
51
51
  "json-schema-for-openapi": "^0.5.0",
52
52
  "lodash.isequal": "^4.5.0",
53
- "openapi-to-postmanv2": "^4.21.0",
53
+ "openapi-to-postmanv2": "^4.24.0",
54
54
  "swagger2openapi": "^7.0.8",
55
- "uuid": "^9.0.1"
55
+ "uuid": "^10.0.0"
56
56
  },
57
57
  "engines": {
58
- "node": ">=14"
58
+ "node": ">=16"
59
59
  },
60
60
  "devDependencies": {
61
- "chai": "^4.3.10",
62
- "mocha": "^10.4.0",
63
- "nock": "^13.5.4",
64
- "sinon": "^18.0.0"
61
+ "chai": "^4.5.0",
62
+ "mocha": "^10.7.3",
63
+ "nock": "^13.5.5",
64
+ "sinon": "^19.0.2"
65
65
  }
66
66
  }
@@ -508,7 +508,7 @@ class DefinitionGenerator {
508
508
  const responses = {};
509
509
  for (const response of documentation.methodResponses) {
510
510
  const obj = {
511
- description: response.responseBody.description || "",
511
+ description: response?.responseBody?.description || "",
512
512
  };
513
513
 
514
514
  this.currentStatusCode = response.statusCode;
@@ -68,10 +68,10 @@ class SchemaHandler {
68
68
  ).catch((err) => {
69
69
  if (err.errors) {
70
70
  for (const error of err?.errors) {
71
- this.__HTTPError(error);
71
+ this.__HTTPError(error, model);
72
72
  }
73
73
  } else {
74
- this.__HTTPError(err);
74
+ this.__HTTPError(err, model);
75
75
  }
76
76
  return modelSchema;
77
77
  });
@@ -228,7 +228,7 @@ class SchemaHandler {
228
228
  }
229
229
  }
230
230
 
231
- __HTTPError(error) {
231
+ __HTTPError(error, model) {
232
232
  if (error.message.includes("HTTP ERROR")) {
233
233
  // throw err;
234
234
  throw new Error(