Skip to content

Instantly share code, notes, and snippets.

@CSchulz

CSchulz/SwaggerServlet.java Secret

Last active May 11, 2016
Embed
What would you like to do?
package de.openknowledge.shop.api;
import io.swagger.jaxrs.config.BeanConfig;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
public class SwaggerServlet extends HttpServlet {
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
BeanConfig beanConfig = new BeanConfig();
beanConfig.setVersion("1.0.0");
beanConfig.setBasePath("/api");
beanConfig.setResourcePackage("de.openknowledge.shop");
beanConfig.setScan(true);
beanConfig.setPrettyPrint(true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment