thim81 / openapi-format

Format an OpenAPI document by ordering, formatting and filtering fields.
MIT License
77 stars 14 forks source link

some needed objects are filtered out when using inverseTags with unusedComponents #106

Open mh196 opened 1 month ago

mh196 commented 1 month ago

Hello Tim, I'm using your wonderfull tool to extract few interfaces from a big openapi file using inverseTags and unusedComponents filter. Unfortunately it looks like there are some used objects also removed. I don't know whether my filter is somehow wrong or whether this is a bug. Would be great if you could have a look. My command line is: openapi-format input.json -f filter.yaml --json -vvv -o output --no-sort I'll attach the source file, filter and output file as well as expected output. Enjoy your day

Markus

output.json filter.yaml.txt Output(expected).json

thim81 commented 1 month ago

hi @mh196

I'll add the provided files to a test and see what could be causing these side-effects. Give me some time to come up with a proper investigation.

thim81 commented 1 month ago

@mh196 Can you review the files you shared? It is not clear what was the original input and expected output?

mh196 commented 1 month ago

Hi Tim, many thanks for the quick response. I've uploaded the output_expected.json again. It contains the price and currency-codes additionally to the output that is created by the openapi-format Kind regards

Markus Output_expected.json