Closed rlemaire closed 12 years ago
Hi @rlemaire we've moved the official swagger-play2 module to here:
https://github.com/wordnik/swagger-core/tree/master/modules/swagger-play2
And will have a "release" of it shortly after it reaches feature parity with the JAX-RS version. So can you try that branch, those instructions and post back any issues to there?
Here is a sample project to get you started:
https://github.com/wordnik/swagger-core/tree/master/samples/scala-play2
Hi Ayush,
Thank you very much for your answer.
I already tried this version, but it doesn't compile (at least on my machine), so I though the other version was the right one.
I'm going to follow the project on github to see your releases. We may use it later.
[INFO] .../swagger-core/modules/swagger-jaxrs-utils/src/main/scala:-1: info: compiling [INFO] Compiling 3 source files to .../swagger-core/modules/swagger-jaxrs-utils/target/classes at 1336985888641 [ERROR] .../swagger-core/modules/swagger-jaxrs-utils/src/main/scala/com/wordnik/resource/util/HealthEndpoint.scala:21: error: HealthSnapshot is not a member of com.wordnik.util.perf [INFO] import com.wordnik.util.perf.HealthSnapshot [INFO] ^ [ERROR] .../swagger-core/modules/swagger-jaxrs-utils/src/main/scala/com/wordnik/resource/util/HealthEndpoint.scala:35: error: not found: value HealthSnapshot [INFO] def getHealth = Response.ok.entity(HealthSnapshot.get()).build [INFO] ^ [ERROR] two errors found
Regards,
Raphaël Lemaire
2012/5/14 Ayush Gupta < reply@reply.github.com
Hi @rlemaire we've moved the official swagger-play2 module to here:
https://github.com/wordnik/swagger-core/tree/master/modules/swagger-play2
And will have a "release" of it shortly after it reaches feature parity with the JAX-RS version. So can you try that branch, those instructions and post back any issues to there?
Here is a sample project to get you started:
https://github.com/wordnik/swagger-core/tree/master/samples/scala-play2
Reply to this email directly or view it on GitHub: https://github.com/ayush/swagger-play2/issues/7#issuecomment-5683986
Thats because the latest worknik-oss is not being used. I just replied to that issue here: https://github.com/wordnik/swagger-core/issues/33
@rlemaire the wordnik-oss snapshot is updated in sonatype now, so you should be able to build w/o locally building.
Hi,
I tried to use this plugin and have the following exception.
I'm new to swagger, so maybe I'm missing something.
Here's the routes I add :
GET /resources.json controllers.ApiHelpController.getResources GET /resources.xml controllers.ApiHelpController.getResources
GET /departureTime.json controllers.ApiHelpController.getResource(path = "/admin") GET /departureTime.xml controllers.ApiHelpController.getResource(path = "/admin")
The Controller (I tried removing the @ApiParamsImplicit) : @Api("/admin") public class TestSwaggerController extends Controller {
}
And the exception.
play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[NullPointerException: null]] at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:134) [play_2.9.1.jar:2.0.1] at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:115) [play_2.9.1.jar:2.0.1] at akka.actor.Actor$class.apply(Actor.scala:311) [akka-actor.jar:2.0.1] at play.core.ActionInvoker.apply(Invoker.scala:113) [play_2.9.1.jar:2.0.1] at akka.actor.ActorCell.invoke(ActorCell.scala:619) [akka-actor.jar:2.0.1] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:196) [akka-actor.jar:2.0.1] Caused by: java.lang.NullPointerException: null at controllers.SwaggerBaseApiController.JsonResponse(ApiHelpController.scala:64) ~[swagger-play2_2.9.1.jar:1.0.1] at controllers.SwaggerBaseApiController.returnValue(ApiHelpController.scala:59) ~[swagger-play2_2.9.1.jar:1.0.1] at controllers.ApiHelpController$$anonfun$getResource$1.apply(ApiHelpController.scala:36) ~[swagger-play2_2.9.1.jar:1.0.1] at controllers.ApiHelpController$$anonfun$getResource$1.apply(ApiHelpController.scala:34) ~[swagger-play2_2.9.1.jar:1.0.1] at play.api.mvc.Action$$anon$1.apply(Action.scala:170) ~[play_2.9.1.jar:2.0.1] at play.core.ActionInvoker$$anonfun$receive$1$$anonfun$6.apply(Invoker.scala:126) ~[play_2.9.1.jar:2.0.1]