use of com.networknt.swagger.SwaggerHandler in project light-rest-4j by networknt.
the class ValidatorHandlerTest method setUp.
@Before
public void setUp() {
if (server == null) {
logger.info("starting server");
HttpHandler handler = getPetStoreHandler();
ValidatorHandler validatorHandler = new ValidatorHandler();
validatorHandler.setNext(handler);
handler = validatorHandler;
BodyHandler bodyHandler = new BodyHandler();
bodyHandler.setNext(handler);
handler = bodyHandler;
SwaggerHandler swaggerHandler = new SwaggerHandler();
swaggerHandler.setNext(handler);
handler = swaggerHandler;
server = Undertow.builder().addHttpListener(8080, "localhost").setHandler(handler).build();
server.start();
}
}
use of com.networknt.swagger.SwaggerHandler in project light-rest-4j by networknt.
the class JwtVerifyHandlerTest method setUp.
@BeforeClass
public static void setUp() {
if (server == null) {
logger.info("starting server");
HttpHandler handler = getTestHandler();
JwtVerifyHandler jwtVerifyHandler = new JwtVerifyHandler();
jwtVerifyHandler.setNext(handler);
SwaggerHandler swaggerHandler = new SwaggerHandler();
swaggerHandler.setNext(jwtVerifyHandler);
server = Undertow.builder().addHttpListener(8080, "localhost").setHandler(swaggerHandler).build();
server.start();
}
}
Aggregations