-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filtering unused components - not working #107
Comments
Thanks for providing the detailed reproduction steps. When I find some time, I'll try to reproduce the behavior based on your archive.zip and steps. I'll share update once we have them. |
Thanks |
Thanks to your clear reproduction steps and archive with your openapi files & config, I did some rework on the unused component tracking and removal logic. You can see the result of your provided example in the openapi-format playground or use your (if you want to open your local config in the online playground, just add --playground |
After validation, feel free to provide your feedback. |
Did you have some time to try out the latest version? To see if your issue is resolved? |
Hi,
I am trying to filter a yaml openapi spec, to remove a path and remove unused schema components.
The path filtering works fine, but the unused component removal does not work - unless I deliberately add an unused component to the original file (I did this by accident while experimenting)
Please see attached zip file for sample files and README.md with steps to reproduce issue
I will also copy in README.md below
There is always the possibility that I am doing something wrong - apologies if that is the case here.
Thanks,
Connor
Mac OS
openapi-format version: tried with 1.14.0 and 1.17.0 - same results
PROBLEM: The 'remove unused components' doesn't work - it leaves some items in there that it shouldn't
Steps to show problem:
observe it has 2 paths, each path references a response schema object which uses a second schema object
this uses "dev-produce-filtered-spec_customFilter.yaml" which only includes one of the paths (WORKS) but should removed unused "schemas" (DOESNT WORK)
observe it includes only one path (correct), but all the schema objects are included - some of which are unused so should have been removed
observe it is the same as the first spec, but it has an unused component in schemas: ThisTypeIsNeverReferencedAnywhere
Note: In the output it says it's removed some unused components
observe the filtering has now worked - one path and all unused components have been removed
Archive.zip
The text was updated successfully, but these errors were encountered: