Open clamothe opened 9 years ago
Also seeing the same thing. I tracked it down to an upstream bug last week, but can't find it anymore.
Edit: May be this one: https://github.com/swagger-api/swagger-core/issues/951
Edit2: It is not the same issue as mine. Mine was this cause:
Caused by: java.lang.NullPointerException
at com.wordnik.swagger.jaxrs.config.BeanConfig.configure(BeanConfig.java:223)
Not sure why it's null though...
@clamothe I don't think this is a dropwizard-swagger
issue. Please check if all of your resources have the @Path
annotation at class-level. I got the same issue here and fixing the annotations the problem gone away. FYI, I'm with dropwizard 0.8.1
and dropwizard-swagger 0.7.0
.
Unfortunately I don't have time to look at this again right now. However if it's helpful, one of my sub-resources intentionally does not have a @Path
annotation.
The error I received was from Swagger's ApiListingResource returning no Path.
This issue should not happen anymore in a future dropwizard release: https://github.com/dropwizard/dropwizard/pull/1067
@esiqveland I am facing the same issue with BeanConfig.java:223 file, did you manage to solve this?
No, but I have not had the time to try it again since I found it didn't work. I downgraded to previous dropwizard-swagger.
Which version is that? does it work with dropwizard 0.8.1?
Worked with 0.6 thanks @esiqveland
@thiagomoretto >>Please check if all of your resources have the @Path annotation at class-level. It worked for me with DropWizard 0.8.2. Thank you!
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.