redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

'remove-unused-components' decorator is not working at the per-API level.

Open ZyzychO opened this issue 1 year ago • 3 comments

Describe the bug

When you configure decorator: 'remove-unused-components' per API level it will not remove the unused To Reproduce

Steps to reproduce the behavior:

  1. Given this redocly.yaml file
apis:
  testclipush@v1:
    root: redint.yaml
    decorators:
      remove-x-internal: on
      remove-unused-components: on


extends: 
  -  minimal


# decorators:
#   remove-unused-components: on
  1. And this OpenAPI file redint.yaml.zip

  2. Run 'redocly bundle' command

  3. Observe that unused component 'StartDate' is not removed from the API definition

Redocly Version(s)

1.21.1

Front logo Front conversations

ZyzychO avatar Aug 29 '24 08:08 ZyzychO

But the remove-unused-components decorator does work on the root level, right @ZyzychO?

tatomyr avatar Aug 29 '24 09:08 tatomyr

Yes, the decorator works on the root level. @tatomyr

ZyzychO avatar Aug 30 '24 12:08 ZyzychO

Related: https://github.com/Redocly/redocly-cli/issues/1323

tatomyr avatar Dec 18 '24 11:12 tatomyr