public final class RemoveUnusedComponents extends java.lang.Object implements OpenApiMapper
This plugin will take effect by default, but can be disabled by setting "openapi.keepUnusedComponents" to true. Refs are removed in rounds until a round of removals has no effect.
TODO: This plugin currently only supports the removal of schemas and security schemes.
Constructor and Description |
---|
RemoveUnusedComponents() |
Modifier and Type | Method and Description |
---|---|
OpenApi |
after(Context<? extends Trait> context,
OpenApi openapi)
Updates an OpenApi object after it is built.
|
byte |
getOrder()
Gets the sort order of the plugin from -128 to 127.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
before, compose, postProcessOperation, updateDefaultSettings, updateNode, updateOperation, updateParameter, updatePathItem, updateRequestBody, updateResponse, updateSecurity, updateSecurityScheme
public byte getOrder()
OpenApiMapper
Plugins are applied according to this sort order. Lower values are executed before higher values (for example, -128 comes before 0, comes before 127). Plugins default to 0, which is the middle point between the minimum and maximum order values.
getOrder
in interface OpenApiMapper
public OpenApi after(Context<? extends Trait> context, OpenApi openapi)
OpenApiMapper
after
in interface OpenApiMapper
context
- Conversion context.openapi
- OpenAPI object to modify.