<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

    <servlet>
        <servlet-name>jersey</servlet-name>
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>jersey.config.server.provider.packages</param-name>
            <param-value>
                io.swagger.jaxrs.json,
                io.swagger.generator.resource
            </param-value>
        </init-param>
        <init-param>
            <param-name>jersey.config.server.provider.classnames</param-name>
            <param-value>
                io.swagger.online.ExceptionWriter,
                io.swagger.generator.util.JacksonJsonProvider,
                io.swagger.jaxrs.listing.ApiListingResource,
                io.swagger.jersey.listing.JerseyApiDeclarationProvider,
                io.swagger.jersey.listing.JerseyResourceListingProvider
            </param-value>
        </init-param>
        <init-param>
            <param-name>jersey.config.server.wadl.disableWadl</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>jersey</servlet-name>
        <url-pattern>/api/*</url-pattern>
    </servlet-mapping>

    <filter>
        <filter-name>ApiOriginFilter</filter-name>
        <filter-class>io.swagger.generator.util.ApiOriginFilter</filter-class>
    </filter>
    <servlet>
        <servlet-name>Bootstrap</servlet-name>
        <servlet-class>io.swagger.generator.Bootstrap</servlet-class>
        <init-param>
            <param-name>generator.host</param-name>
            <param-value>localhost:8080</param-value>
        </init-param>
        <init-param>
            <param-name>generator.protocol</param-name>
            <param-value>http</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>
    <filter-mapping>
        <filter-name>ApiOriginFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
</web-app>