Gi60s / openapi-enforcer

Apache License 2.0
94 stars 22 forks source link

detect and remove unused #89

Open delanym opened 4 years ago

delanym commented 4 years ago

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.

Gi60s commented 4 years ago

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

LasneF commented 3 years ago

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.