-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to provide Play configuration from build.sbt #5
Add option to provide Play configuration from build.sbt #5
Conversation
Having a quick look at your changes, I suspect you have that error because you're using Sbt's build-time classloader is different from the classloader used to run the application (or in this case, generate the swagger spec). On top of that, they're typically running different binary-incompatible scala and scala-library versions. I believe the latest sbt is running scala 2.12 and most of us are using scala 2.13 for our applications. I think the only solution is to avoid any scala types in that signature and stick to plain old Java classes. I think a nullable |
Hello, thanks for your answer! I came to the exact same conclusion, and now have all tests passing. Thinking the generics could be the problem, I also tried passing a The test I added replicates the configuration from the existing one, but in build.sbt instead of application.conf - output is unchanged, so that's looking great. |
runner/src/main/scala/com/github/dwickern/swagger/SwaggerRunner.scala
Outdated
Show resolved
Hide resolved
6bcafe1
to
f2b95b7
Compare
I added cache invalidation so that we will re-generate swagger.json when |
That makes sense! Just one thing, the Play secret key was here because I copied it from |
Right, the secret key is only needed for |
Released version 0.4.0. Thanks! 🎉 |
My pleasure! Just updated the dependency in one of our projects and it solves our issues 😃 At the same time I noticed I messed up the changelog 😅 I opened a new PR to fix that. |
Aims to solve #3 and #4 🎉
At this point the PR is pretty much a fingers-crossed venture, because I was unable to run the tests locally. I had to change the signature of
SwaggerRunner.run
by adding one argument, I performed the change in both places (definition and call site) but the scripted tests do not seem to like that:Do you have any insight to help me run the tests @dwickern ?