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.AbstractSpecFilterAn implementation of theOpenAPISpecFilterthat 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 Constructor Description OpenAPISpecFilterSet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidclear()Clear all filtersjava.util.Optional<io.swagger.v3.oas.models.OpenAPI>filterOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI, java.util.Map<java.lang.String,java.util.List<java.lang.String>> params, java.util.Map<java.lang.String,java.lang.String> cookies, java.util.Map<java.lang.String,java.util.List<java.lang.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, isRemovingUnreferencedDefinitions
-
-
-
-
Method Detail
-
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()
-
clear
public static void clear()
Clear all filters
-
filterOpenAPI
public java.util.Optional<io.swagger.v3.oas.models.OpenAPI> filterOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI, java.util.Map<java.lang.String,java.util.List<java.lang.String>> params, java.util.Map<java.lang.String,java.lang.String> cookies, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)- Specified by:
filterOpenAPIin interfaceio.swagger.v3.core.filter.OpenAPISpecFilter- Overrides:
filterOpenAPIin classio.swagger.v3.core.filter.AbstractSpecFilter
-
-