3 ms·
Are you trying to prune inaccessible types or something? I'm not sure what you mean by concise complete subset, but in the past I had good success with custom
by dtkav 2y ago
Are you trying to prune inaccessible types or something?
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].
[0] https://github.com/stoplightio/spectral https://github.com/stoplightio/spectral
- bravura 2y agoThe task: I have a massive OpenAPI spec, and I want to drop all operations except for read-only ones. I want to preserve all referenced types, but slim the YAML as much as possible and remove extraneous elements. 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.