Closed crodriguezleon closed 4 months ago
This has been resolved in v0.8.7
A test has been added to validate:
https://github.com/daveshanley/vacuum/blob/main/functions/openapi/unused_component_test.go#L303
Hello @daveshanley,
Just tested it and the issue keeps happening for me with v0.8.7
.
I've attached a zip file with the specification I've used to test it and the report I get.
Thanks in advance!
OK this is strange. I will re-investigate for you.
This has been resolved in v0.9
The Example.zip now passes.
Summary
Vacuum detects components as unused when they are only referenced from a component that inherits from another component using the
allOf
keyword.Example
Expected result
Breed
should not be detected as unused byoas3-unused-component
rule because it's being referenced fromDog
.Actual result
Vacuum detects
Breed
as an unused component. If we remove theallOf
section from theDog
definition, thenBreed
is not detected anymore as unused.