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", 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": [ 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" }