Giter Club home page Giter Club logo

dropwizard-swagger's People

Contributors

chmodas avatar drane avatar dren-dk avatar federecio avatar jameslauser avatar mattcarrier avatar mcarrierastonish avatar pphatak avatar sfdc-matrix-salt-bootstrap avatar tburch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dropwizard-swagger's Issues

Remove {format} for Jax-rs

Hi,

probably I'm missing something, but if I set JaxrsApiReader.setFormatString(""); the swagger-ui doesn't works correctly.

I need to remove the .json suffix...how can I do it?

No Content Returned

Every call returns "No Content". I make the actual rest calls using a client and I get the info i expect but when I use the Swagger I never get anything back.

NoClassDefFoundError when trying to start the application

Hi,
I'm trying to use dropwizard-swagger in a simple Dropwizard app; I followed the simple getting started tutorial; and I've added the dependency in my pom.xml; then I added the call to onInitialize in initialize() routine; and onRun in run().

Now, when I try to run the project, I get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/spi/service/ServiceFinder
at io.dropwizard.views.ViewBundle.(ViewBundle.java:87)
at io.federecio.dropwizard.swagger.SwaggerDropwizard.onInitialize(SwaggerDropwizard.java:40)

The problem seems to be on .onInitialize() call; in fact if I comment that out, the application starts, but obviously the /swagger endpoint doesn't work (500 error).

Problem with custom base URL

We have all our Jersey APIs running under /api. When I add the Swagger module to DropWizard it seems to put /swagger under /api (so /api/swagger) but it still expects /api-docs to be at the root (vs /api/api-docs). I didn't see a good way to fix the "api-docs" URL so that its properly nested under /api.

Support for dropwizard v0.8 series

Are there any plans to support dropwizard's v0.8 series? It introduces some breaking API changes with many dependency version upgrades, so I'm guessing upgrading dropwizard-swagger might be non-trivial.

I tried following the instructions to add dropwizard-swagger to my dropwizard 0.8-rc2-snapshot project, but I received the following stack trace when I run my integration tests:

java.lang.NoClassDefFoundError: com/sun/jersey/spi/service/ServiceFinder
    at io.dropwizard.views.ViewBundle.<init>(ViewBundle.java:87)
    at io.federecio.dropwizard.swagger.SwaggerDropwizard.onInitialize(SwaggerDropwizard.java:40)
    at org.coner.ConerDropwizardApplication.initialize(ConerDropwizardApplication.java:56)
    at io.dropwizard.testing.DropwizardTestSupport.startIfRequired(DropwizardTestSupport.java:135)
    at io.dropwizard.testing.DropwizardTestSupport.before(DropwizardTestSupport.java:71)
    at io.dropwizard.testing.junit.DropwizardAppRule.before(DropwizardAppRule.java:66)
    at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:27)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.ClassNotFoundException: com.sun.jersey.spi.service.ServiceFinder
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 26 more

I cloned the dropwizard-swagger-sample-app, and it built and ran perfectly as-is, but when I upgraded its dropwizard dependency to v0.8.0-rc2-SNAPSHOT, I now receive essentially the same stack trace as seen in my project's integration tests:

$ java -jar target/dropwizard-swagger-sample-app-1.0-SNAPSHOT.jar server src/main/resources/sample-config.yaml 
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/spi/service/ServiceFinder
    at io.dropwizard.views.ViewBundle.<init>(ViewBundle.java:87)
    at io.federecio.dropwizard.swagger.SwaggerDropwizard.onInitialize(SwaggerDropwizard.java:35)
    at io.federecio.dropwizard.swagger.sample.SampleApplication.initialize(SampleApplication.java:21)
    at io.dropwizard.Application.run(Application.java:71)
    at io.federecio.dropwizard.swagger.sample.SampleApplication.main(SampleApplication.java:16)
Caused by: java.lang.ClassNotFoundException: com.sun.jersey.spi.service.ServiceFinder
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 5 more

Update README regarding dedicated host & port

The README documents swaggerDropwizard.onRun(configuration, environment, "your_host_here", 4242); but this method does not exist (anymore?). There's only a method that accepts a String but not an int.

No support for setting api.version?

I don't see how I could set the api.version parameter for Swagger. It's not documented here and the dropwizard-swagger sample application also doesn't show. The API version is reported as 0.0 there as well.

No support for choosing swagger-ui version

I've just hooked up dropwizard-swagger and it's great, but looks like I'm hitting this issue: swagger-api/swagger-ui#485

It would be great if there were a way to select which version of swagger-ui to use. Perhaps each version of swagger-ui could be bundled as a separate jar to allow overriding it?

Happy to implement this if you feel the solution would work.

Swagger 0.5.2 doesn't support "application/x-www-form-urlencoded" media type

I am trying out swagger 0.5.2, it doesn't support "application/x-www-form-urlencoded" media type. It generates a doc successfully but when I send a request, it gives 500 error message.

<< Source Code >>

@post
@consumes(MediaType.APPLICATION_FORM_URLENCODED)
@ApiOperation(
value = "Get access token",
notes = "Authenticate user and get a access token.",
response = TokenResponse.class
)
public TokenResponse postForToken(
@FormParam("grant_type") @ApiParam(defaultValue = "password") String grantType,
@FormParam("username") @ApiParam(defaultValue = "q") String username,
@FormParam("password") @ApiParam(defaultValue = "q") String password,
@FormParam("client_id") @ApiParam(defaultValue = "1") String clientId
)

How to access "Swagger" object

Hi!

I want to set additional information to my swagger config (Tag descriptions for example) like this example:

 Info info = new Info()
      .title("Swagger Sample App")
      .description("This is a sample server Petstore server.  You can find out more about Swagger " + 
        "at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger.  For this sample, " + 
        "you can use the api key \"special-key\" to test the authorization filters")
      .termsOfService("http://helloreverb.com/terms/")
      .contact(new Contact()
        .email("[email protected]"))
      .license(new License()
        .name("Apache 2.0")
        .url("http://www.apache.org/licenses/LICENSE-2.0.html"));

swagger.setInfo(info);

swagger.tag(new Tag()
      .name("pet")
      .description("Everything about your Pets")
      .externalDocs(new ExternalDocs("Find out more", "http://swagger.io")));
swagger.tag(new Tag()
      .name("store")
      .description("Access to Petstore orders"));
 swagger.tag(new Tag()
      .name("user")
      .description("Operations about user")
      .externalDocs(new ExternalDocs("Find out more about our store", "http://swagger.io")));

I'm unable to set that kind of properties within SwaggerBundleConfiguration (Only title, description, terms of service, license and contact are available). I've actually tried to obtain the Swagger object via ApplicationContext but without any luck (it returns null). Is there a way to access the swagger base object to do this (any other workaround will be appreciated tough)?.

Thanks!

Doesn't work with Dropwizard 0.8.0 (final)

Hi,
I've been using dropwizard-swagger with drop wizard 0.8.0-rc1 and it worked without problems. Now, once updated drop wizard to 0.8.0 (final release), drop wizard-swagger is unable to start, and the entire application crashes.
The problem is in ViewBundle instantiation, because ViewBundle now is a generic class and it's abstract.

The application fails on:

bootstrap.addBundle(new SwaggerBundle<MyConfiguration>());

With the typical java error that you get when you're trying to instantiate an abstract class:

Exception in thread "main" java.lang.InstantiationError: io.dropwizard.views.ViewBundle
    at io.federecio.dropwizard.swagger.SwaggerDropwizard.onInitialize(SwaggerDropwizard.java:47)
    at io.federecio.dropwizard.swagger.SwaggerDropwizard.initialize(SwaggerDropwizard.java:43)
    at io.dropwizard.setup.Bootstrap.addBundle(Bootstrap.java:142)
    at com.my.app.mainclass(mainclass.java:55)

JSON Snake Case and model classes

Hi,
I noticed that, even if I enabled JSON snake case serialization by dropwizard's @JsonSnakeCase annotation on top of every model class, Dropwizard-Swagger generate API Models with classic camelCase (so it just prints out the Java variable name for each JSON field).

Is there an option to force Swagger to generate snake_case field names instead of camelCase ones?

@ApiImplicitParam not working

I need to use @ApiImplicitParam(https://github.com/swagger-api/swagger-core/wiki/Annotations#apiimplicitparam-apiimplicitparams) in my project. But it was not working.

The dropwizard-swagger version used is 0.7.0

The issue can be reproduced by adding the following method in SampleResoucrce.java in dropwizard-swagger-sample-app (1.0-SNAPSHOT)

@GET
@Path( "/addUserWithToken" )
@ApiOperation( "Sample header param" )
@ApiImplicitParams({@ApiImplicitParam(name = "authToken", required = true, dataType = "string", paramType = "header")})
public Response addUserWithToken(@QueryParam( "name" )
String name )
{

    return Response.ok( new SamplePojo( name,2313 ) ).build();

}

The generated swagger.json didn't have the params listed in ApiImplicitParams.
Could you please have a look?

Add support for Swagger 2.0 spec

As Swagger 2.0 spec has been recently released, it would be ideal to update the project so that it supports it. The problem is not in the Java side but on the UI since it seems that Swagger UI still doesn't fully support the 2.0 spec.

Will report back here about my findings. cc / @muralidharz

Setting the hostname/port from dropwizard config file?

I can see there are a few ways of setting the hostname/port, one involves hardcoding into java, the other relates to a hosted provider. Wondering if there is a way to just set it in the dropwizard config (yaml) file?

That would be so much easier!

Thanks!

Matt.

images / js not found

Hi , I try to run dropwizard (0.7) with your dropwizard-swagger.
But it seems it cannot find JS/images

Can you check it out ?

2014-05-17_00-52-29

2014-05-17_00-54-55

I am trying out dropwizard-swagger, and with both 0.5.1 and 0.5.2-SNAPSHOT getting JS error

I am trying out a basic HelloWorld Dropwizard app, using Dropwizard 0.7.1. The UI keeps throwing a javascript error:

swagger_ui

Here is what the raw API output for my HelloWorld service looks like:

   {"apiVersion":"0.0","swaggerVersion":"1.2","basePath":"http://localhost:8080","resourcePath":"/hello-world","produces":["application/json"],"apis":[{"path":"/hello-world","operations":[{"method":"GET","summary":"Say hello","notes":"More notes about this method","type":"Saying","nickname":"sayHello","authorizations":{},"parameters":[{"name":"name","description":"Name to reply back with","required":false,"items":{"type":"string"},"paramType":"query"}],"responseMessages":[{"code":400,"message":"Invalid ID supplied"}]}]}],"models":{"Saying":{"id":"Saying","properties":{"id":{"type":"integer","format":"int64"},"content":{"type":"string"}}}}}

Any ideas on debugging this?

The POM for com.federecio:dropwizard-swagger:jar:0.2-SNAPSHOT is missing

I'm unable to use this, though it looks interesting. The README is out of date as you've updated to Dropwizard 0.7 but mention 0.1-SNAPSHOT which is 0.6. But using 0.2 as the version isn't enough because the https://repository-federecio1.forge.cloudbees.com/snapshot/ doesn't contain 0.2. But checking the POM reveals another repository. https://oss.sonatype.org/content/repositories/snapshots/. Including that repository results in a .jar file but no POM. Seems close, but not quite.

image

Swagger changed packaging. Need to update to new dependencies and packages.

I encountered an issue with the @ApiImplicitParam annotation not making it through the the swagger.json. I tracked the bug back to an issue with the version of the swagger-jersey2-jaxrs-1.5.1-M2 jar. They've fixed the bug in more recent versions. Normally with Maven, I'd just force to a more recent version. However since then, they've also repackaged the swagger libraries (in June I think). They have new package names and a new Maven Group ID. So, I can't fix this issue simply through Maven.

Any plans to update to the new packaging so that future fixes with Swagger can be picked up?

Java 8 support

Hi,

Just tried to use this project with java 8 and it doesn't work, is it known issue ?

Thanks,
Genady

/usr/java/jdk1.8.0_51/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:50896,suspend=y,server=n -Dfile.encoding=UTF-8 -classpath /usr/java/jdk1.8.0_51/jre/lib/rt.jar:/usr/java/jdk1.8.0_51/jre/lib/javaws.jar:/usr/java/jdk1.8.0_51/jre/lib/deploy.jar:/usr/java/jdk1.8.0_51/jre/lib/jfr.jar:/usr/java/jdk1.8.0_51/jre/lib/plugin.jar:/usr/java/jdk1.8.0_51/jre/lib/jsse.jar:/usr/java/jdk1.8.0_51/jre/lib/management-agent.jar:/usr/java/jdk1.8.0_51/jre/lib/jce.jar:/usr/java/jdk1.8.0_51/jre/lib/charsets.jar:/usr/java/jdk1.8.0_51/jre/lib/resources.jar:/usr/java/jdk1.8.0_51/jre/lib/jfxswt.jar:/usr/java/jdk1.8.0_51/jre/lib/ext/cldrdata.jar:/usr/java/jdk1.8.0_51/jre/lib/ext/dnsns.jar:/usr/java/jdk1.8.0_51/jre/lib/ext/localedata.jar:/usr/java/jdk1.8.0_51/jre/lib/ext/jfxrt.jar:/usr/java/jdk1.8.0_51/jre/lib/ext/zipfs.jar:/usr/java/jdk1.8.0_51/jre/lib/ext/nashorn.jar:/usr/java/jdk1.8.0_51/jre/lib/ext/sunpkcs11.jar:/usr/java/jdk1.8.0_51/jre/lib/ext/sunjce_provider.jar:/usr/java/jdk1.8.0_51/jre/lib/ext/sunec.jar:/home/dev/workspace/jCrawler/target/classes:/home/dev/.m2/repository/io/dropwizard/dropwizard-core/0.8.2/dropwizard-core-0.8.2.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-util/0.8.2/dropwizard-util-0.8.2.jar:/home/dev/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.5.0/jackson-annotations-2.5.0.jar:/home/dev/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar:/home/dev/.m2/repository/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.jar:/home/dev/.m2/repository/joda-time/joda-time/2.7/joda-time-2.7.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-jackson/0.8.2/dropwizard-jackson-0.8.2.jar:/home/dev/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.5.1/jackson-core-2.5.1.jar:/home/dev/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.5.1/jackson-databind-2.5.1.jar:/home/dev/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk7/2.5.1/jackson-datatype-jdk7-2.5.1.jar:/home/dev/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-guava/2.5.1/jackson-datatype-guava-2.5.1.jar:/home/dev/.m2/repository/com/fasterxml/jackson/module/jackson-module-afterburner/2.5.1/jackson-module-afterburner-2.5.1.jar:/home/dev/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-joda/2.5.1/jackson-datatype-joda-2.5.1.jar:/home/dev/.m2/repository/org/slf4j/slf4j-api/1.7.10/slf4j-api-1.7.10.jar:/home/dev/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-validation/0.8.2/dropwizard-validation-0.8.2.jar:/home/dev/.m2/repository/org/hibernate/hibernate-validator/5.1.3.Final/hibernate-validator-5.1.3.Final.jar:/home/dev/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar:/home/dev/.m2/repository/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar:/home/dev/.m2/repository/com/fasterxml/classmate/1.0.0/classmate-1.0.0.jar:/home/dev/.m2/repository/org/glassfish/javax.el/3.0.0/javax.el-3.0.0.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-configuration/0.8.2/dropwizard-configuration-0.8.2.jar:/home/dev/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.5.1/jackson-dataformat-yaml-2.5.1.jar:/home/dev/.m2/repository/org/yaml/snakeyaml/1.12/snakeyaml-1.12.jar:/home/dev/.m2/repository/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-logging/0.8.2/dropwizard-logging-0.8.2.jar:/home/dev/.m2/repository/io/dropwizard/metrics/metrics-logback/3.1.1/metrics-logback-3.1.1.jar:/home/dev/.m2/repository/org/slf4j/jul-to-slf4j/1.7.10/jul-to-slf4j-1.7.10.jar:/home/dev/.m2/repository/ch/qos/logback/logback-core/1.1.2/logback-core-1.1.2.jar:/home/dev/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.10/log4j-over-slf4j-1.7.10.jar:/home/dev/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.10/jcl-over-slf4j-1.7.10.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-util/9.2.9.v20150224/jetty-util-9.2.9.v20150224.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-metrics/0.8.2/dropwizard-metrics-0.8.2.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-jersey/0.8.2/dropwizard-jersey-0.8.2.jar:/home/dev/.m2/repository/org/glassfish/jersey/core/jersey-server/2.19/jersey-server-2.19.jar:/home/dev/.m2/repository/org/glassfish/jersey/core/jersey-common/2.19/jersey-common-2.19.jar:/home/dev/.m2/repository/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.19/jersey-guava-2.19.jar:/home/dev/.m2/repository/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1.jar:/home/dev/.m2/repository/org/glassfish/jersey/core/jersey-client/2.19/jersey-client-2.19.jar:/home/dev/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar:/home/dev/.m2/repository/org/glassfish/jersey/media/jersey-media-jaxb/2.19/jersey-media-jaxb-2.19.jar:/home/dev/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar:/home/dev/.m2/repository/org/glassfish/hk2/hk2-api/2.4.0-b25/hk2-api-2.4.0-b25.jar:/home/dev/.m2/repository/org/glassfish/hk2/hk2-utils/2.4.0-b25/hk2-utils-2.4.0-b25.jar:/home/dev/.m2/repository/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b25/aopalliance-repackaged-2.4.0-b25.jar:/home/dev/.m2/repository/org/glassfish/hk2/external/javax.inject/2.4.0-b25/javax.inject-2.4.0-b25.jar:/home/dev/.m2/repository/org/glassfish/hk2/hk2-locator/2.4.0-b25/hk2-locator-2.4.0-b25.jar:/home/dev/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar:/home/dev/.m2/repository/org/glassfish/jersey/ext/jersey-metainf-services/2.19/jersey-metainf-services-2.19.jar:/home/dev/.m2/repository/io/dropwizard/metrics/metrics-jersey2/3.1.1/metrics-jersey2-3.1.1.jar:/home/dev/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.5.1/jackson-jaxrs-json-provider-2.5.1.jar:/home/dev/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.5.1/jackson-jaxrs-base-2.5.1.jar:/home/dev/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.5.1/jackson-module-jaxb-annotations-2.5.1.jar:/home/dev/.m2/repository/org/glassfish/jersey/containers/jersey-container-servlet/2.19/jersey-container-servlet-2.19.jar:/home/dev/.m2/repository/org/glassfish/jersey/containers/jersey-container-servlet-core/2.19/jersey-container-servlet-core-2.19.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-server/9.2.9.v20150224/jetty-server-9.2.9.v20150224.jar:/home/dev/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-io/9.2.9.v20150224/jetty-io-9.2.9.v20150224.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-webapp/9.2.9.v20150224/jetty-webapp-9.2.9.v20150224.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-xml/9.2.9.v20150224/jetty-xml-9.2.9.v20150224.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-continuation/9.2.9.v20150224/jetty-continuation-9.2.9.v20150224.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-servlets/0.8.2/dropwizard-servlets-0.8.2.jar:/home/dev/.m2/repository/io/dropwizard/metrics/metrics-annotation/3.1.1/metrics-annotation-3.1.1.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-jetty/0.8.2/dropwizard-jetty-0.8.2.jar:/home/dev/.m2/repository/io/dropwizard/metrics/metrics-jetty9/3.1.1/metrics-jetty9-3.1.1.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-servlet/9.2.9.v20150224/jetty-servlet-9.2.9.v20150224.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-security/9.2.9.v20150224/jetty-security-9.2.9.v20150224.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-servlets/9.2.9.v20150224/jetty-servlets-9.2.9.v20150224.jar:/home/dev/.m2/repository/org/eclipse/jetty/jetty-http/9.2.9.v20150224/jetty-http-9.2.9.v20150224.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-lifecycle/0.8.2/dropwizard-lifecycle-0.8.2.jar:/home/dev/.m2/repository/io/dropwizard/metrics/metrics-core/3.1.1/metrics-core-3.1.1.jar:/home/dev/.m2/repository/io/dropwizard/metrics/metrics-jvm/3.1.1/metrics-jvm-3.1.1.jar:/home/dev/.m2/repository/io/dropwizard/metrics/metrics-servlets/3.1.1/metrics-servlets-3.1.1.jar:/home/dev/.m2/repository/io/dropwizard/metrics/metrics-json/3.1.1/metrics-json-3.1.1.jar:/home/dev/.m2/repository/io/dropwizard/metrics/metrics-healthchecks/3.1.1/metrics-healthchecks-3.1.1.jar:/home/dev/.m2/repository/net/sourceforge/argparse4j/argparse4j/0.4.4/argparse4j-0.4.4.jar:/home/dev/.m2/repository/org/eclipse/jetty/toolchain/setuid/jetty-setuid-java/1.0.2/jetty-setuid-java-1.0.2.jar:/home/dev/.m2/repository/io/federecio/dropwizard-swagger/0.7.0/dropwizard-swagger-0.7.0.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-assets/0.8.0/dropwizard-assets-0.8.0.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-views/0.8.0/dropwizard-views-0.8.0.jar:/home/dev/.m2/repository/io/dropwizard/dropwizard-views-freemarker/0.8.0/dropwizard-views-freemarker-0.8.0.jar:/home/dev/.m2/repository/org/freemarker/freemarker/2.3.21/freemarker-2.3.21.jar:/home/dev/.m2/repository/com/wordnik/swagger-jersey2-jaxrs/1.5.1-M2/swagger-jersey2-jaxrs-1.5.1-M2.jar:/home/dev/.m2/repository/com/wordnik/swagger-jaxrs/1.5.1-M2/swagger-jaxrs-1.5.1-M2.jar:/home/dev/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.4.2/jackson-dataformat-xml-2.4.2.jar:/home/dev/.m2/repository/org/codehaus/woodstox/stax2-api/3.1.4/stax2-api-3.1.4.jar:/home/dev/.m2/repository/com/wordnik/swagger-core/1.5.1-M2/swagger-core-1.5.1-M2.jar:/home/dev/.m2/repository/com/wordnik/swagger-models/1.5.1-M2/swagger-models-1.5.1-M2.jar:/home/dev/.m2/repository/com/wordnik/swagger-annotations/1.5.1-M2/swagger-annotations-1.5.1-M2.jar:/home/dev/.m2/repository/org/reflections/reflections/0.9.9/reflections-0.9.9.jar:/home/dev/.m2/repository/com/google/code/findbugs/annotations/2.0.1/annotations-2.0.1.jar:/home/dev/.m2/repository/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/home/dev/idea-IC-141.713.2/lib/idea_rt.jar com.bionic8.core.SampleApplication server /home/dev/workspace/jCrawler/conf/sample-config.yaml
Connected to the target VM, address: '127.0.0.1:50896', transport: 'socket'
INFO [2015-07-23 09:24:46,138] org.eclipse.jetty.util.log: Logging initialized @1797ms
INFO [2015-07-23 09:24:46,247] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/*
INFO [2015-07-23 09:24:46,408] org.reflections.Reflections: Reflections took 88 ms to scan 1 urls, producing 6 keys and 6 values
INFO [2015-07-23 09:24:46,421] io.dropwizard.server.ServerFactory: Starting SampleApplication
INFO [2015-07-23 09:24:46,507] org.eclipse.jetty.setuid.SetUIDListener: Opened SampleApplication@701bc94e{HTTP/1.1}{0.0.0.0:9999}
INFO [2015-07-23 09:24:46,511] org.eclipse.jetty.server.Server: jetty-9.2.9.v20150224
INFO [2015-07-23 09:24:47,259] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources:

GET     /sample (com.bionic8.com.bionic8.resources.SampleResource)
GET     /sample/hello-with-path-param/{name} (com.bionic8.com.bionic8.resources.SampleResource)
GET     /sample/hello-with-query-param (com.bionic8.com.bionic8.resources.SampleResource)
POST    /sample (com.bionic8.com.bionic8.resources.SampleResource)
GET     /swagger (io.federecio.dropwizard.swagger.SwaggerResource)
GET     /swagger.json (com.wordnik.swagger.jaxrs.listing.ApiListingResource)
GET     /swagger.yaml (com.wordnik.swagger.jaxrs.listing.ApiListingResource)

INFO [2015-07-23 09:24:47,263] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@f29353f{/,null,AVAILABLE}
INFO [2015-07-23 09:24:47,269] io.dropwizard.setup.AdminEnvironment: tasks =

POST    /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask)
POST    /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask)

INFO [2015-07-23 09:24:47,280] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@59939293{/admin,null,AVAILABLE}
INFO [2015-07-23 09:24:47,287] org.eclipse.jetty.server.ServerConnector: Started SampleApplication@701bc94e{HTTP/1.1}{0.0.0.0:9999}
INFO [2015-07-23 09:24:47,287] org.eclipse.jetty.server.Server: Started @2948ms
10.20.0.2 - - [23/Jul/2015:09:25:02 +0000] "GET /swagger HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36" 215
INFO [2015-07-23 09:25:02,678] org.reflections.Reflections: Reflections took 2 ms to scan 1 urls, producing 6 keys and 6 values
ERROR [2015-07-23 09:25:02,684] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: 812f1669da3252f6
! java.lang.NullPointerException: null
! at com.wordnik.swagger.jaxrs.config.BeanConfig.configure(BeanConfig.java:223) ~[swagger-jaxrs-1.5.1-M2.jar:1.5.1-M2]
! at com.wordnik.swagger.jaxrs.listing.ApiListingResource.scan(ApiListingResource.java:53) ~[swagger-jaxrs-1.5.1-M2.jar:1.5.1-M2]
! at com.wordnik.swagger.jaxrs.listing.ApiListingResource.getListingJson(ApiListingResource.java:80) ~[swagger-jaxrs-1.5.1-M2.jar:1.5.1-M2]
! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_51]
! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_51]
! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51]
! at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51]
! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) ~[jersey-server-2.19.jar:na]
! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) ~[jersey-server-2.19.jar:na]
! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) ~[jersey-server-2.19.jar:na]
! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) ~[jersey-server-2.19.jar:na]
! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ~[jersey-server-2.19.jar:na]
! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[jersey-server-2.19.jar:na]

Javascript exception in v0.5.3 in the Swagger UI

My app worked fine with v0.5.2 but when I upgrade to v0.5.3 I get an exception with the following stack trace:

Uncaught Error: Unknown template object: function handlebars-2.0.0.js:27
e handlebars-2.0.0.js:27
a.template swagger-ui.js:187 (anonymous function)
swagger-ui.js:226 (anonymous function)

I tried to debug this but failed due to the complexity of swagger-ui.js.

v0.5.3 -- Not using Swagger API v1.3.12 -- Uses v1.3.2

The Readme states that 1.3.12 is used for v0.5.3.... but examining the POM, I see:

<swagger.version>1.3.2</swagger.version>

This older version does not have the @inherited annotation, which causes issues where child classes aren't picking up annotations from it's parent.

The @inherited annotation was added to Swagger API 1.3.9....

Any chance you could upgrade Swagger to 1.3.9 (or 12)... so we can take advantage of this feature? Unfortunately, I am not able to upgrade to DropWizard .8 yet due to other dependencies.

How to set supportedSubmitMethods

Hi

I don't want users to send stuff to the API. How do I go about turning it off? I understand that it can be done by removing HTTP verbs from supportedSubmitMethods but I can't find it.

swagger ui stuck at "fetching resource list:" (Uncaught TypeError: Cannot read property 'length' of null)

I am trying to integrate swagger in the application and swagger ui is stuck at "fetching resource list: /api/swagger.json"

F12 on the browser indicates the below issue @ swagger-client.js line no. 626

Uncaught TypeError: Cannot read property 'length' of null

swagger-client.js: line no. 626
if(typeof param['enum'] !== 'undefined') {

I am using dropwizard-swagger 0.7 version with swagger-core / swagger-annotation / swagger-jaxrs / swagger-jersey2-jaxrs version of 1.5.1-M2.

I have tried to direct access the /api/swagger.json and I think the problem seems to be below "null" parameters returned in the json.

Any thoughts on the issue.

parameters: [
{
name: "type",
in: "query",
description: null,
required: false,
type: "string",
items: null,
collectionFormat: null,
default: null,
pattern: null,
format: null,
enum: null
}

Add support for dropwizard 0.8.1

When using dropwizard-swagger with dropwizard 0.8.1 I get following exception on startup:

Exception in thread "main" java.lang.AbstractMethodError
at io.dropwizard.views.ViewBundle.run(ViewBundle.java:112)
at io.dropwizard.views.ViewBundle.run(ViewBundle.java:92)
at io.dropwizard.setup.Bootstrap.run(Bootstrap.java:183)
at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76)
at io.dropwizard.cli.Cli.run(Cli.java:70)
at io.dropwizard.Application.run(Application.java:73)
at ibid.server.portal.PortalService.main(PortalService.java:50)

This seems to be a dependency issue - rebuilding dropwizard-swagger against 0.8.1 and disabling maven-enforcer-plugin (dropwizard-junit depends on 0.8.0 and fails build) allows to start without problem.

Permit scanning of environment

It would be immensely useful to have dropwizard-swagger permit scanning of the Dropwizard environment for resources, rather than an entire package. My primary use case is that I have a resource I am working on, but have not yet registered it. Should I choose to deploy the application, that resource will be documented by Swagger as it resides in the package I have told it to scan. I propose allowing Swagger to scan the Dropwizard Environment in the event that the resourcePackage is null or empty.

I have a forthcoming PR for this.

"Try it out" button does not honour the service port

The request sent when the "Try it out" button is clicked does not use the correct service port.

In index.ftl, the ${contextPath} variable is used to create a url variable which links back to the service. This variable does not contain a port number, and so the requests fail when the service is not running on port 80.

I think that the ${contextPath} variable should contain the service port number, as well as the context. Possibly the code from

https://github.com/federecio/dropwizard-swagger/blob/master/src/main/java/com/federecio/dropwizard/swagger/SwaggerBundle.java#L83

could be reused to generate the correct value?

Unable to run contextPath other than /

My dropwizard runs under "applicationContextPath: /api"
But dropwizard-swagger seems problematic .
After opening http://localhost:8080/api/swagger-ui/
It reports it cannot Can't read swagger JSON from http://localhost:8080/api-docs
I have to change the /api-docs to /api/api-docs to make it able to find api-docs

Andโ€ฆ
The test cannot be run , because it assumes I am running in "/" :
2014-05-17_02-08-44

How to config it ? Can dropwizard-swagger auto discovery the context path ? Thanks.

Plan to support all fields in BeanConfig?

Currently SwaggerBundleConfiguration doesn't support fields such as host, schemes as well as extensions of "x-" inside info object. Are there plan to add these soon?

Unable to serve static assets when using this

Hi, I am trying to use this package in a dropwizard application. However as soon as I use this the static assets stop working.

public void initialize(Bootstrap<AppConfiguration> bootstrap) {
        bootstrap.addBundle(new AssetsBundle("/assets/app/", "/", "index.html"));
        bootstrap.addBundle(hibernateBundle);
        swaggerDropwizard.onInitialize(bootstrap);
    }
    public void run(AppConfiguration configuration,
                    Environment environment) throws Exception {
        this.configuration = configuration;
        environment.jersey().setUrlPattern("/api/*");
        environment.jersey().register(new ProjectResource(
            new ProjectDAO(hibernateBundle.getSessionFactory())));
        //initData.init();
        swaggerDropwizard.onRun(configuration, environment, "localhost");
}

Here, if I comment the last line: swaggerDropwizard.onRun(configuration, environment, "localhost");
the index.html starts working. However if I leave it, then I get a 404 on root path.
Is there a workaround for this?

IllegalArgumentException when using Optional

When using Guava's Optional with a @QueryParam annotation the scanner does not recognize the object defining it as null producing the following exception.

io.federecio.dropwizard.junitrunner.DropwizardJunitRunnerException: java.lang.IllegalArgumentException: Unrecognized Type: [null]
    ...
Caused by: java.lang.IllegalArgumentException: Unrecognized Type: [null]
    at com.fasterxml.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:405)
    at com.fasterxml.jackson.databind.type.TypeFactory.constructType(TypeFactory.java:354)
    at com.fasterxml.jackson.databind.ObjectMapper.constructType(ObjectMapper.java:1330)
    at com.wordnik.swagger.jackson.ModelResolver.resolveProperty(ModelResolver.java:62)
    ...

To reproduce the exception during unit tests I've added an Optional argument to io.federecio.dropwizard.swagger.TestResource.

 @GET
    @ApiOperation(OPERATION_DESCRIPTION)
    public Response dummyEndpoint(@QueryParam("dummy") final Optional<String> dummy) {
        return Response.ok().build();
    }

Branch containing the updated method can be found here -> https://github.com/TimeIncOSS/dropwizard-swagger/tree/optional-issue

Unable to get controller name in swagger ui

I have 5 controller.In UI it shows all the four controller services in one section without controller name,after it show userpreference controller with their service.Userpreference controller only showed properly.Please guide me where is something wrong.

output

Dropwizard 0.8.1, Swagger 1.5, instantiationError: com.wordnik.swagger.config.SwaggerConfig

    BeanConfig swaggerConfig = new BeanConfig();
    swaggerConfig.setVersion("2.0"); // This is the swagger version?
    swaggerConfig.setResourcePackage("com.kessel");
    swaggerConfig.setScan(true);
    swaggerConfig.setBasePath(".." + environment.getApplicationContext().getContextPath());

Results in this stack trace:

    Exception in thread "main" java.lang.InstantiationError: com.wordnik.swagger.config.SwaggerConfig
at com.wordnik.swagger.config.ConfigFactory$.<init>(ConfigFactory.scala:7)
at com.wordnik.swagger.config.ConfigFactory$.<clinit>(ConfigFactory.scala)
at com.wordnik.swagger.jaxrs.config.BeanConfig.<init>(BeanConfig.scala:26)

I've got the following two dependencies in gradle. That should be sufficient, yes?

compile group: "com.wordnik", name: "swagger-jersey-jaxrs_2.10", version: "1.3.12"
compile group: "com.wordnik", name: "swagger-core", version: "1.5.3-M1"

NPE in Dropwizard 0.8.0, 0.8.1

apiListingResource.getPath() returns null in some scenarios, resulting in a NPE in Dropwizard code. Tested with dropwizard-swagger 0.7.0 and Dropwizard 0.8.0 and 0.8.1.
dropwizard-swagger 0.6.0 works fine.

WARN  [2015-05-13 23:03:47,140] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@7f3e9acc: javax.servlet.ServletException: org.glassfish.jersey.servlet.ServletContainer-2d4f67e@7502d052==org.glassfish.jersey.servlet.ServletContainer,1,false
! java.lang.NullPointerException: null
! at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.normalizePath(DropwizardResourceConfig.java:182) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.populateEndpoints(DropwizardResourceConfig.java:156) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.populateEndpoints(DropwizardResourceConfig.java:151) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.<init>(DropwizardResourceConfig.java:147) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig.getEndpointsInfo(DropwizardResourceConfig.java:125) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig.logComponents(DropwizardResourceConfig.java:76) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig$ComponentLoggingListener.onEvent(DropwizardResourceConfig.java:202) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at org.glassfish.jersey.server.internal.monitoring.CompositeApplicationEventListener.onEvent(CompositeApplicationEventListener.java:74) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:587) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:166) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:327) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors$2.call(Errors.java:289) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors$2.call(Errors.java:286) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:286) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:324) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:338) ~[jersey-container-servlet-core-2.17.jar:na]
! at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:171) ~[jersey-container-servlet-core-2.17.jar:na]
! at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:363) ~[jersey-container-servlet-core-2.17.jar:na]
! at javax.servlet.GenericServlet.init(GenericServlet.java:244) ~[javax.servlet-api-3.1.0.jar:3.1.0]
! at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! ... 36 common frames omitted
! Causing: javax.servlet.ServletException: org.glassfish.jersey.servlet.ServletContainer-2d4f67e@7502d052==org.glassfish.jersey.servlet.ServletContainer,1,false
! at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:633) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at com.codahale.metrics.jetty9.InstrumentedHandler.doStart(InstrumentedHandler.java:103) ~[metrics-jetty9-3.1.1.jar:3.1.1]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.StatisticsHandler.doStart(StatisticsHandler.java:232) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.Server.start(Server.java:387) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.Server.doStart(Server.java:354) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.8.1.jar:0.8.1]
! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43) [dropwizard-core-0.8.1.jar:0.8.1]
! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76) [dropwizard-core-0.8.1.jar:0.8.1]
! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.8.1.jar:0.8.1]
! at io.dropwizard.Application.run(Application.java:73) [dropwizard-core-0.8.1.jar:0.8.1]
! at com.keypr.webservices.WebServicesApplication.main(WebServicesApplication.java:32) [main/:na]
ERROR [2015-05-13 23:03:47,140] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down
! java.lang.NullPointerException: null
! at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.normalizePath(DropwizardResourceConfig.java:182) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.populateEndpoints(DropwizardResourceConfig.java:156) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.populateEndpoints(DropwizardResourceConfig.java:151) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.<init>(DropwizardResourceConfig.java:147) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig.getEndpointsInfo(DropwizardResourceConfig.java:125) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig.logComponents(DropwizardResourceConfig.java:76) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at io.dropwizard.jersey.DropwizardResourceConfig$ComponentLoggingListener.onEvent(DropwizardResourceConfig.java:202) ~[dropwizard-jersey-0.8.1.jar:0.8.1]
! at org.glassfish.jersey.server.internal.monitoring.CompositeApplicationEventListener.onEvent(CompositeApplicationEventListener.java:74) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:587) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:166) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:327) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors$2.call(Errors.java:289) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors$2.call(Errors.java:286) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:286) ~[jersey-common-2.17.jar:na]
! at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:324) ~[jersey-server-2.17.jar:na]
! at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:338) ~[jersey-container-servlet-core-2.17.jar:na]
! at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:171) ~[jersey-container-servlet-core-2.17.jar:na]
! at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:363) ~[jersey-container-servlet-core-2.17.jar:na]
! at javax.servlet.GenericServlet.init(GenericServlet.java:244) ~[javax.servlet-api-3.1.0.jar:3.1.0]
! at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! ... 36 common frames omitted
! Causing: javax.servlet.ServletException: org.glassfish.jersey.servlet.ServletContainer-2d4f67e@7502d052==org.glassfish.jersey.servlet.ServletContainer,1,false
! at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:633) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298) ~[jetty-servlet-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at com.codahale.metrics.jetty9.InstrumentedHandler.doStart(InstrumentedHandler.java:103) ~[metrics-jetty9-3.1.1.jar:3.1.1]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.StatisticsHandler.doStart(StatisticsHandler.java:232) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.Server.start(Server.java:387) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.server.Server.doStart(Server.java:354) ~[jetty-server-9.2.9.v20150224.jar:9.2.9.v20150224]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.2.9.v20150224.jar:9.2.9.v20150224]
! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.8.1.jar:0.8.1]
! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43) [dropwizard-core-0.8.1.jar:0.8.1]
! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76) [dropwizard-core-0.8.1.jar:0.8.1]
! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.8.1.jar:0.8.1]
! at io.dropwizard.Application.run(Application.java:73) [dropwizard-core-0.8.1.jar:0.8.1]
! at com.keypr.webservices.WebServicesApplication.main(WebServicesApplication.java:32) [main/:na]
INFO  [2015-05-13 23:03:47,161] org.eclipse.jetty.server.ServerConnector: Stopped application@1d7f2f0a{HTTP/1.1}{0.0.0.0:8080}
INFO  [2015-05-13 23:03:47,162] org.eclipse.jetty.server.ServerConnector: Stopped admin@54defd69{HTTP/1.1}{0.0.0.0:9090}
Exception in thread "main" javax.servlet.ServletException: org.glassfish.jersey.servlet.ServletContainer-2d4f67e@7502d052==org.glassfish.jersey.servlet.ServletContainer,1,false
    at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:633)
    at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at com.codahale.metrics.jetty9.InstrumentedHandler.doStart(InstrumentedHandler.java:103)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.server.handler.StatisticsHandler.doStart(StatisticsHandler.java:232)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    at org.eclipse.jetty.server.Server.start(Server.java:387)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
    at org.eclipse.jetty.server.Server.doStart(Server.java:354)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43)
    at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43)
    at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76)
    at io.dropwizard.cli.Cli.run(Cli.java:70)
    at io.dropwizard.Application.run(Application.java:73)
    at com.keypr.webservices.WebServicesApplication.main(WebServicesApplication.java:32)
Caused by: java.lang.NullPointerException
    at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.normalizePath(DropwizardResourceConfig.java:182)
    at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.populateEndpoints(DropwizardResourceConfig.java:156)
    at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.populateEndpoints(DropwizardResourceConfig.java:151)
    at io.dropwizard.jersey.DropwizardResourceConfig$EndpointLogger.<init>(DropwizardResourceConfig.java:147)
    at io.dropwizard.jersey.DropwizardResourceConfig.getEndpointsInfo(DropwizardResourceConfig.java:125)
    at io.dropwizard.jersey.DropwizardResourceConfig.logComponents(DropwizardResourceConfig.java:76)
    at io.dropwizard.jersey.DropwizardResourceConfig$ComponentLoggingListener.onEvent(DropwizardResourceConfig.java:202)
    at org.glassfish.jersey.server.internal.monitoring.CompositeApplicationEventListener.onEvent(CompositeApplicationEventListener.java:74)
    at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:587)
    at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:166)
    at org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:327)
    at org.glassfish.jersey.internal.Errors$2.call(Errors.java:289)
    at org.glassfish.jersey.internal.Errors$2.call(Errors.java:286)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:286)
    at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:324)
    at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:338)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:171)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:363)
    at javax.servlet.GenericServlet.init(GenericServlet.java:244)
    at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612)
    ... 36 more

relative basePath in swagger.json

In my swagger.json I can see the basePath set to "basePath":"/my-application", which is relative. How can I make it absolute and have something like "basePath":"http://localhost:9999/my-application". beacuse I am not able to acess the swagger through api-proxy. Can you please provide some pointers?

Relevant settings from my .yml file,

basic server configuration. no need to modify this section

server:
type: simple
applicationContextPath: /my-application
connector:
type: http
port: 9999

the resource package used to generate swagger

swagger:
resourcePackage: com.sciplay.myapplication.api

dropwizard-swagger doesn`t work correctly when running app with oneJar

Hello,
I am trying to use the package in a dropwizard project. I have followed the steps from the "How to use it" in the README.md file. When running the application from my IDE, it all works correctly as described. But when I run my oneJar file the http://localhost:8080/swagger doesn`t work correcly(javascript and css resources are not loaded).
http://localhost:8080/api-docs returns the correct json, the problem is only in the swagger ui.

Edit: I use the gradle-one-jar plugin to build the oneJar. Probable cause is the plugin itself. See: dropwizard/dropwizard#311 and also: https://groups.google.com/forum/#!topic/dropwizard-user/MSp3RjtJy1o

Do not see /index.html

Hi-

I set up the 0.1-SNAPSHOT version because I use dropwizard 0.6.2. When I run my app, I see this. There is no /index.html available, but api-docs.json works. I don't have any classes with Swagger annotations. Is that why there is no index.html? If you only support 0.2-SNAPSHOT with DR 0.7.0-SNAPSHOT, that's fine, I was just wondering if I had something completely wrong.

Thanks.

INFO [2013-09-13 03:59:47,353] com.yammer.dropwizard.cli.ServerCommand: Starting hello-world
INFO [2013-09-13 03:59:47,356] org.eclipse.jetty.server.Server: jetty-8.1.10.v20130312
INFO [2013-09-13 03:59:47,469] com.sun.jersey.server.impl.application.WebApplicationImpl: Initiating Jersey application, version 'Jersey: 1.17.1 02/28/2013 12:47 PM'
INFO [2013-09-13 03:59:47,557] com.yammer.dropwizard.config.Environment: The following paths were found for the configured resources:

GET     /api-docs.json (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON)
GET     /api-docs.json/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON)
GET     /hello-world (com.example.helloworld.resources.HelloWorldResource)
POST    /hello-world (com.example.helloworld.resources.HelloWorldResource)
POST    /hello-world/multi-part (com.example.helloworld.resources.HelloWorldResource)
POST    /hello-world/single-part (com.example.helloworld.resources.HelloWorldResource)

INFO [2013-09-13 03:59:47,558] com.yammer.dropwizard.config.Environment: tasks =

POST    /tasks/gc (com.yammer.dropwizard.tasks.GarbageCollectionTask)

INFO [2013-09-13 03:59:47,866] org.eclipse.jetty.server.AbstractConnector: Started [email protected]:8080
INFO [2013-09-13 03:59:47,868] org.eclipse.jetty.server.AbstractConnector: Started [email protected]:8081
127.0.0.1 - - [13/Sep/2013:03:59:58 +0000] "GET /index.html HTTP/1.1" 404 1328 11 11
127.0.0.1 - - [13/Sep/2013:04:00:02 +0000] "GET /index.html HTTP/1.1" 404 1328 2 2
127.0.0.1 - - [13/Sep/2013:04:00:04 +0000] "GET /index.html HTTP/1.1" 404 1328 23 23
127.0.0.1 - - [13/Sep/2013:04:00:25 +0000] "GET /api-docs.json HTTP/1.1" 200 24 334 334

Image not found on page

Getting this when clicking the "Try it out!"-button and it doesn't work.

[12/Sep/2014:08:40:47 +0000] "GET /images/throbber.gif HTTP/1.1" 404 - "http://localhost:9040/swagger" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4)"

May be an issue with the resource bundle?

This is using Dropwizard 0.7.1 and dropwizard-swagger 0.5.1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.