Class SwaggerRewriterInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.swagger.SwaggerRewriterInterceptor
- All Implemented Interfaces:
Interceptor
- Description
- Allow Swagger proxying
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.predic8.membrane.core.interceptor.Interceptor
Interceptor.Flow -
Field Summary
Fields inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
name, router -
Constructor Summary
ConstructorsConstructorDescriptionSwaggerRewriterInterceptor(SwaggerCompatibleOpenAPI swag, boolean rewrite) SwaggerRewriterInterceptor(SwaggerCompatibleOpenAPI swag, boolean rewrite, String json) SwaggerRewriterInterceptor(SwaggerCompatibleOpenAPI swag, String swagUrl) -
Method Summary
Modifier and TypeMethodDescriptionhandleRequest(Exchange exc) handleResponse(Exchange exc) voidinit()Called after parsing is complete and this has been added to the object tree (whose root is Router).booleanvoidsetRewriteUI(boolean rewriteUI) voidsetSwagger(SwaggerCompatibleOpenAPI swagger) voidsetSwaggerJson(String swaggerJson) Methods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getLongDescription, getMessage, getRouter, getRule, handleAbort, init, setDisplayName, setFlow
-
Constructor Details
-
SwaggerRewriterInterceptor
public SwaggerRewriterInterceptor() -
SwaggerRewriterInterceptor
-
SwaggerRewriterInterceptor
-
SwaggerRewriterInterceptor
-
SwaggerRewriterInterceptor
-
-
Method Details
-
init
Description copied from class:AbstractInterceptorCalled after parsing is complete and this has been added to the object tree (whose root is Router).- Overrides:
initin classAbstractInterceptor- Throws:
Exception
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor- Throws:
Exception
-
handleResponse
- Specified by:
handleResponsein interfaceInterceptor- Overrides:
handleResponsein classAbstractInterceptor- Throws:
Exception
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceInterceptor- Overrides:
getShortDescriptionin classAbstractInterceptor
-
getSwagger
-
setSwagger
-
isRewriteUI
public boolean isRewriteUI() -
setRewriteUI
public void setRewriteUI(boolean rewriteUI) - Default
- true
- Description
- Whether a Swagger-UI should also be rewritten.
-
getSwaggerJson
-
setSwaggerJson
- Default
- swagger.json
- Description
- Swagger specification filename. The default is 'swagger.json', which is also recommended.
-