Search in sources :

Example 1 with OpenApiHandler

use of com.networknt.openapi.OpenApiHandler in project light-rest-4j by networknt.

the class IntegrationTest method setUp.

@BeforeClass
public static void setUp() {
    if (server == null) {
        logger.info("starting server");
        HttpHandler handler = setupRoutings();
        OpenApiHandler openApiHandler = new OpenApiHandler();
        openApiHandler.setNext(handler);
        ParameterHandler parameterHandler = new ParameterHandler();
        parameterHandler.setNext(openApiHandler);
        handler = parameterHandler;
        server = Undertow.builder().addHttpListener(7080, "localhost").setHandler(handler).build();
        server.start();
    }
}
Also used : HttpHandler(io.undertow.server.HttpHandler) OpenApiHandler(com.networknt.openapi.OpenApiHandler) BeforeClass(org.junit.BeforeClass)

Aggregations

OpenApiHandler (com.networknt.openapi.OpenApiHandler)1 HttpHandler (io.undertow.server.HttpHandler)1 BeforeClass (org.junit.BeforeClass)1