I'm looking for a solution to filter large openapi specs to the most concise complete subset. I've implemented three different variations, two of which appear not to prune enough, and one of which appears to prune too much.
Any recommendations?
Any recommendations?
I'm not sure what you mean by concise complete subset, but in the past I had good success with custom rules in spectral [0].
I've tried prunes operations while preserving referenced components using redocly.
I've tried openapi-extract CLI to extract only components I reference.
And I've tried openapi-format CLI.
They all give different results, and I can't tell whether I am pruning too much or too little.
And yes I'm using spectral at the end, but it doesn't necessarily show it you're missing something that isn't referenced in the final output.