JEE and Swagger UI

Full example

https://github.com/szalek/JEE-Swagger

Configuration

 

/src/main/java/pl/btbw/core/MyApplication.java

package pl.btbw.core;

import io.swagger.jaxrs.config.BeanConfig;

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;

@ApplicationPath("/rest")
public class MyApplication extends Application {

	public MyApplication() {
		BeanConfig beanConfig = new BeanConfig();
		beanConfig.setVersion("1.0.0");
		beanConfig.setSchemes(new String[]{"http"});
		beanConfig.setHost("localhost:8080");
		beanConfig.setBasePath("/jee-swagger/rest");
		beanConfig.setResourcePackage("pl.btbw.modules");
		beanConfig.setScan(true);
	}

}

/pom.xml

<dependency>
    <groupId>io.swagger</groupId>
    <artifactId>swagger-jaxrs</artifactId>
    <version>1.5.0</version>
</dependency>