use of com.predic8.membrane.core.rules.SwaggerProxy in project service-proxy by membrane.
the class SwaggerRewriterInterceptor method init.
@Override
public void init() throws Exception {
// inherit wsdl="..." from SoapProxy
if (this.swagger == null) {
Rule parent = router.getParentProxy(this);
if (parent instanceof SwaggerProxy) {
setSwagger(((SwaggerProxy) parent).getSwagger());
}
}
// use default if no SwaggerProxy is found
if (this.swagger == null) {
String swaggerSource = IOUtils.toString(this.getRouter().getResolverMap().resolve(this.swaggerJson));
this.swagger = new SwaggerParser().parse(swaggerSource);
this.swaggerUrl = this.swaggerJson;
}
}
Aggregations