openapi-enforcer icon indicating copy to clipboard operation
openapi-enforcer copied to clipboard

detect and remove unused

Open delanym opened this issue 4 years ago • 2 comments

Especially when I use the deference feature, but even just generally, it would be handy if this could detect and potentially remove unused elements. So if I remove a path, the operation would remove its unused component schemas and responses.

delanym avatar Oct 13 '20 10:10 delanym

I think this is doable. I'll see what I can come up with.

Gi60s avatar Oct 13 '20 22:10 Gi60s

i come up with same requirement , spotting unused definition , and raising a warning could apply on definitions, and response for OAS this would enhance the swagger quality . but may be a bit challenging to implements . one way to do is to do deference from endpoint and marking as processed , then redo a pass and raise warning for all unmarked field.

LasneF avatar Dec 09 '20 09:12 LasneF