Closed lloydmeta closed 10 years ago
We haven't tried this lib with Akka 2.3 and Spray 1.3 yet, we're still on Akka 2.2.3 and Spray 1.2.
I forked your repo and tried to get things working with the downgraded version of Akka (2.2.3), just to see things working. Please see commit: https://github.com/gagnechris/spray-servlet-scratchpad/commit/7bbc41c35bf0c522c575a37713ffbb72dc64aeee with my changes.
These changes resolve the exceptions you were seeing, but I was unable to get the routing working (need some more time to investigate). Please take a look at these changes and let me know how you make out. Hopefully this gives you the push forward you need.
@gagnechris thanks a lot ! Among the other changes, it didn't even occur to me to look at version differences either.
I'll have a look and see if I can get the routing working with your changes.
Again, I really appreciate it !
I got this working now on lloydmeta/spray-servlet-scratchpad so I'll close this issue.
It seems the most important part was to have the SwaggerHttpService
trait instantiated as it's own separate object rather than extended as part of an existing object that already extends HttpService
. Then, compose your existing routes with the .routes
method of that SwaggerHttpService
object, like the way you did.
If you want, you can check it out by going to /swagger/ of my project (works with Akka 2.3 and Spray 1.3 :) )
Thanks a lot for the help!
I have sample project here that I'm using to try out your lib :)
Unfortunately, when I run it (just
container:start
from sbt for now), it dies with the following trace caused by ajava.lang.NullPointerException
. I've declared the modelTypes and also annotated the model; what could be missing ?