serverless-openapi-documenter 0.0.109 → 0.0.110

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/README.md CHANGED
@@ -12,13 +12,13 @@
12
12
  </a>
13
13
  </p>
14
14
 
15
- This will generate an OpenAPI V3 (up to v3.0.3) file for you from your serverless file. It can optionally generate a [Postman Collection V2](https://github.com/postmanlabs/openapi-to-postman) from the OpenAPI file for you too. This currently works for `http` and `httpApi` configurations.
15
+ This will generate an OpenAPI V3 (up to v3.0.4) file for you from your serverless file. It can optionally generate a [Postman Collection V2](https://github.com/postmanlabs/openapi-to-postman) from the OpenAPI file for you too. This currently works for `http` and `httpApi` configurations.
16
16
 
17
17
  Originally based off of: https://github.com/temando/serverless-openapi-documentation
18
18
 
19
19
  ## Install
20
20
 
21
- This plugin works for Serverless (2.x, 3.x and 4.x) and only supports node.js 14 and up.
21
+ This plugin works for Serverless (2.x, 3.x and 4.x) and only supports node.js 20 and up.
22
22
 
23
23
  To add this plugin to your package.json:
24
24
 
@@ -39,7 +39,7 @@ plugins:
39
39
 
40
40
  ## Adding documentation to serverless
41
41
 
42
- To Run: `serverless openapi generate -o openapi.json -f json -a 3.0.3 -p postman.json`
42
+ To Run: `serverless openapi generate -o openapi.json -f json -a 3.0.4 -p postman.json`
43
43
 
44
44
  Options:
45
45
 
@@ -316,7 +316,7 @@ custom:
316
316
  in: header
317
317
  ```
318
318
 
319
- It accepts all available Security Schemes and follows the specification: https://spec.openapis.org/oas/v3.0.3#security-scheme-object
319
+ It accepts all available Security Schemes and follows the specification: https://spec.openapis.org/oas/v3.0.4#security-scheme-object
320
320
 
321
321
  #### Security on each operation
322
322
 
@@ -904,7 +904,7 @@ getContent:
904
904
 
905
905
  You can refer to the `operationId` that you created.
906
906
 
907
- You can read more about [links](https://swagger.io/docs/specification/links/) on the swagger.io site and in the [OpenAPI](https://spec.openapis.org/oas/v3.0.3#link-object) specification. They don't seem widely supported just yet, but perhaps they'll improve your documentation.
907
+ You can read more about [links](https://swagger.io/docs/specification/links/) on the swagger.io site and in the [OpenAPI](https://spec.openapis.org/oas/v3.0.4#link-object) specification. They don't seem widely supported just yet, but perhaps they'll improve your documentation.
908
908
 
909
909
  ##### `responseHeaders`
910
910
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serverless-openapi-documenter",
3
- "version": "0.0.109",
3
+ "version": "0.0.110",
4
4
  "description": "Generate OpenAPI v3 documentation and Postman Collections from your Serverless Config",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -51,17 +51,16 @@
51
51
  "js-yaml": "^4.1.0",
52
52
  "json-schema-for-openapi": "^0.5.0",
53
53
  "lodash.isequal": "^4.5.0",
54
- "openapi-to-postmanv2": "^4.24.0",
55
- "swagger2openapi": "^7.0.8",
56
- "uuid": "^10.0.0"
54
+ "openapi-to-postmanv2": "^5.0.0",
55
+ "uuid": "^11.1.0"
57
56
  },
58
57
  "engines": {
59
- "node": ">=16"
58
+ "node": ">=20"
60
59
  },
61
60
  "devDependencies": {
62
61
  "chai": "^4.5.0",
63
- "mocha": "^10.7.3",
64
- "nock": "^13.5.5",
65
- "sinon": "^19.0.2"
62
+ "mocha": "^11.1.0",
63
+ "nock": "^14.0.2",
64
+ "sinon": "^20.0.0"
66
65
  }
67
66
  }
@@ -237,7 +237,9 @@ describe("OpenAPIGenerator", () => {
237
237
  it("should throw an error when writing a file fails", function () {
238
238
  const errStub = sinon.stub(logOutput.log, "error").returns("");
239
239
  const succSpy = sinon.spy(logOutput.log, "success");
240
- const fsStub = sinon.stub(fs, "writeFileSync").throws(new Error());
240
+ const fsStub = sinon
241
+ .stub(fs, "writeFileSync")
242
+ .throws(new Error("throwing an error from writeFileSync"));
241
243
  const openAPIGenerator = new OpenAPIGenerator(sls, {}, logOutput);
242
244
  openAPIGenerator.processCliInput();
243
245
 
@@ -258,7 +260,7 @@ describe("OpenAPIGenerator", () => {
258
260
  const errStub = sinon.spy(logOutput.log, "error");
259
261
  const succSpy = sinon.spy(logOutput.log, "success");
260
262
  const pgStub = sinon.stub(PostmanGenerator, "convert");
261
- pgStub.yields(new Error());
263
+ pgStub.yields(new Error("throwing an error from PostmanGenerator"));
262
264
 
263
265
  const openAPIGenerator = new OpenAPIGenerator(sls, {}, logOutput);
264
266
  openAPIGenerator.processCliInput();