redocly-cli
redocly-cli copied to clipboard
false warning about unused decorator
Describe the bug
To Reproduce Steps to reproduce the behavior:
npx @redocly/cli bundle apidocs/openapi.json -o apidocs/openapi.json
Expected behavior
Should not log warning about unused decorator since unused components were removed
Logs
bundling apidocs/ld-openapi.json...
📦 Created a bundle for apidocs/ld-openapi.json at apidocs/ld-openapi.json 128ms.
🧹 Removed 4 unused components.
[WARNING] Unused decorators found in .redocly.yaml: remove-unused-components.`
OpenAPI description
.redocly.yaml
extends:
- recommended
rules:
operation-operationId: error
operation-operationId-unique: error
no-unused-components: error
decorators:
remove-unused-components: true
Redocly Version(s)
1.6.0
Node.js Version(s)
v21.3.0
Thanks for bringing this up! I believe it is related to the way Redocly CLI handles this specific decorator.
I'm also running into this issue where the unused components are removed, everything works perfectly, but I get the message that the decorator was unused.