Class OpenAPISpecFilterSet
java.lang.Object
io.swagger.v3.core.filter.AbstractSpecFilter
org.sdase.commons.server.openapi.filter.OpenAPISpecFilterSet
- All Implemented Interfaces:
io.swagger.v3.core.filter.OpenAPISpecFilter
public class OpenAPISpecFilterSet
extends io.swagger.v3.core.filter.AbstractSpecFilter
An implementation of the
OpenAPISpecFilter that delegates the request to multiple
registered filters. Since swagger-core always creates a new instance of this filter, the
registered filters are stored statically.
These filters is applied on every call to /openapi.{yaml|json} and can inject information from the request context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Clear all filtersOptional<io.swagger.v3.oas.models.OpenAPI>filterOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) static voidregister(io.swagger.v3.core.filter.OpenAPISpecFilter filter) Register a filter that should be called when an OpenAPI file is returned to a caller.Methods inherited from class io.swagger.v3.core.filter.AbstractSpecFilter
filterOperation, filterParameter, filterPathItem, filterRequestBody, filterResponse, filterSchema, filterSchemaProperty, isRemovingUnreferencedDefinitionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.swagger.v3.core.filter.OpenAPISpecFilter
isOpenAPI31Filter
-
Constructor Details
-
OpenAPISpecFilterSet
public OpenAPISpecFilterSet()
-
-
Method Details
-
register
public static void register(io.swagger.v3.core.filter.OpenAPISpecFilter filter) Register a filter that should be called when an OpenAPI file is returned to a caller.- Parameters:
filter- the filter to register- See Also:
-
clear
public static void clear()Clear all filters -
filterOpenAPI
public Optional<io.swagger.v3.oas.models.OpenAPI> filterOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) - Specified by:
filterOpenAPIin interfaceio.swagger.v3.core.filter.OpenAPISpecFilter- Overrides:
filterOpenAPIin classio.swagger.v3.core.filter.AbstractSpecFilter
-