From 6acfdfce65a49518dee5a66836521b26b9c15775 Mon Sep 17 00:00:00 2001 From: Jared Evans Date: Wed, 2 Apr 2025 12:24:30 +0100 Subject: [PATCH 1/3] updates links correctly to redocly --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5e37fba..5a64520 100644 --- a/README.md +++ b/README.md @@ -1009,18 +1009,18 @@ I am making use of https://www.npmjs.com/package/@redocly/openapi-core, which I I have configured the validator to use these Rules: -- [spec](https://redocly.com/docs/cli/rules/spec/) -- [path-parameters-defined](https://redocly.com/docs/cli/rules/path-parameters-defined/) -- [operation-2xx-response](https://redocly.com/docs/cli/rules/operation-2xx-response/) -- [operation-4xx-response](https://redocly.com/docs/cli/rules/operation-4xx-response/) -- [operation-operationId-unique](https://redocly.com/docs/cli/rules/operation-operationid-unique/) -- [path-declaration-must-exist](https://redocly.com/docs/cli/rules/path-declaration-must-exist/) +- [struct](https://redocly.com/docs/cli/rules/oas/struct) +- [path-parameters-defined](https://redocly.com/docs/cli/rules/oas/path-parameters-defined) +- [operation-2xx-response](https://redocly.com/docs/cli/rules/oas/operation-2xx-response) +- [operation-4xx-response](https://redocly.com/docs/cli/rules/oas/operation-4xx-response) +- [operation-operationId-unique](https://redocly.com/docs/cli/rules/oas/operation-operationId-unique) +- [path-declaration-must-exist](https://redocly.com/docs/cli/rules/oas/path-declaration-must-exist) However, you can configure your own rules from the [ruleset available on the Redocly site](https://redocly.com/docs/cli/rules/built-in-rules/). To do this, you will need to create a `redocly.json` file within an `options` folder. The file should look like: ```json { - "spec": "error", + "struct": "error", "path-parameters-defined": "error", "operation-2xx-response": "error", "operation-4xx-response": "error", From 5b6a6d6c001bc3c3c019ac068a9b882f28dae5d0 Mon Sep 17 00:00:00 2001 From: Jared Evans Date: Wed, 2 Apr 2025 12:24:48 +0100 Subject: [PATCH 2/3] spec has been deprecated, use struct --- src/definitionGenerator.js | 2 +- test/helpers/redocly.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/definitionGenerator.js b/src/definitionGenerator.js index 2041c17..bff418b 100644 --- a/src/definitionGenerator.js +++ b/src/definitionGenerator.js @@ -81,7 +81,7 @@ class DefinitionGenerator { this.REDOCLY_RULES = require(path.resolve("options", "redocly.json")); } catch (err) { this.REDOCLY_RULES = { - spec: "error", + struct: "error", "path-parameters-defined": "error", "operation-2xx-response": "error", "operation-4xx-response": "error", diff --git a/test/helpers/redocly.json b/test/helpers/redocly.json index 1c64f6c..935771f 100644 --- a/test/helpers/redocly.json +++ b/test/helpers/redocly.json @@ -1,4 +1,4 @@ { - "spec": "error", + "struct": "error", "operation-2xx-response": "warn" } From d3081998a3f8f69652eb4a843db845c2b7bf4a00 Mon Sep 17 00:00:00 2001 From: Jared Evans Date: Wed, 2 Apr 2025 12:27:54 +0100 Subject: [PATCH 3/3] 0.0.111 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index dd59273..5e5efde 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "serverless-openapi-documenter", - "version": "0.0.110", + "version": "0.0.111", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "serverless-openapi-documenter", - "version": "0.0.110", + "version": "0.0.111", "license": "MIT", "dependencies": { "@apidevtools/json-schema-ref-parser": "^9.1.0", diff --git a/package.json b/package.json index ccf023d..9421793 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "serverless-openapi-documenter", - "version": "0.0.110", + "version": "0.0.111", "description": "Generate OpenAPI v3 documentation and Postman Collections from your Serverless Config", "main": "index.js", "keywords": [