Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

Does not support Play 2.5 #150

Open
zhenwenc opened this issue May 17, 2016 · 11 comments
Open

Does not support Play 2.5 #150

zhenwenc opened this issue May 17, 2016 · 11 comments

Comments

@zhenwenc
Copy link

sbt-play-swagger version: 0.1.9
sbt-play version: 2.5.3 (tried 2.5.0 and 2.5.2)

Got the following exception when running sbt test:
too many arguments for constructor MultipartFormData: (dataParts: Map[String,Seq[String]], files: Seq[play.api.mvc.MultipartFormData.FilePart[A]], badParts: Seq[play.api.mvc.MultipartFormData.BadPart])play.api.mvc.MultipartFormData[A] [error] val form = new MultipartFormData(data, files, Nil, Nil)

Following is the change of MultipartFormData class in Play 2.5 if that helps:
https://www.playframework.com/documentation/2.5.3/api/scala/index.html#play.api.mvc.MultipartFormData

@zhenwenc
Copy link
Author

Another kindly suggestion, if its possible please also tag / release the sbt plugin version. Thanks!

@slavaschmidt
Copy link
Contributor

@zhenwenc Thanks for the bug report.
Play version 2.5 is not supported as for now, we probably will need different plugin versions for 2.4 and 2.5.
We'll tag the version 0.1.9 as soon as it will be "officially" released. Currently it's only published for activator template testing.

@zhenwenc
Copy link
Author

zhenwenc commented May 19, 2016

Also, I have trouble using path parameters. I just checked out the source code from master branch, and sbt test will fail with:

[info] SecurityApiYamlSpec
[info]
[info] GET /security/pets/{id} should
[info]   + discard invalid data
[error]   x do something with valid data
[error]    Expected true but got false
[error]    given response code 404 and 'Accept' header 'application/json' and URL: [/security/pets/?] (security.api.yaml.scala:38)

I tried with my spec file, the same issue occurs. Could you have a look if this is an issue or I have anything misconfigured. Thanks!

@slavaschmidt
Copy link
Contributor

@zhenwenc What the business logic in the controller looks like?

@zhenwenc
Copy link
Author

@slavaschmidt Its pretty much the same as the paths settings in the security api example. And looks like the test (master branch) for play-swagger-service doesn't pass (sorry I forgot to mention that the above test is coming from your play-swagger-service repo).

@slavaschmidt
Copy link
Contributor

@zhenwenc Sure, the test is supposed to fail until the logic in the controller is implemented. I'll update an example to day to make it pass.

@zhenwenc
Copy link
Author

@slavaschmidt Many thanks!

@harshvs20
Copy link

Do you have any ETA for Play2.5 support ?

@slavaschmidt
Copy link
Contributor

@harshvs20 The changes between 2.5 and 2.4 are more involving than we expected. The form support for example is only minor issue. Currently we are trying to figure out whether we could avoid having two separate branches for different play versions.

So, unfortunately, we can't formulate any timelines in this regard yet. Sorry.

slavaschmidt added a commit that referenced this issue Jun 18, 2016
slavaschmidt added a commit that referenced this issue Jun 21, 2016
@slavaschmidt
Copy link
Contributor

@zhenwenc @harshvs20 @dehora @tlossen @achim if you like, you could try out addSbtPlugin("de.zalando" % "sbt-api-first-hand" % "0.1.12") ? It's former sbt-play-swagger but changed to support play 2.5. Thanks!

@slavaschmidt
Copy link
Contributor

The idea is to provide two different plugins for play 2.4 and 2.5 as it is not possible to support both play versions at the same time

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants