swagger-api / swagger-api/swagger-codegen
[SCALA] Support scala 2.12 with Codegen 3.0
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When generating with -I scala, the resulting build.sbt has scalaVersion := "2.11.12". Manually updating this to 2.12.x results in a failure to find the "com.wordnik.swagger" %% "swagger-async-httpclient" % "0.3.5" dependency.
Swagger-codegen version
$ swagger-codegen version
17:40:00.117 [main] DEBUG io.swagger.codegen.v3.cli.SwaggerCodegen - there are not options for command 'langs'
17:40:00.118 [main] DEBUG io.swagger.codegen.v3.cli.SwaggerCodegen - there are not options for command 'version'
3.0.10
As there is a related issue for swagger 2.x, this is not a regression.
Swagger declaration file content or url
Any valid swagger file.
Command line used for generation
swagger-codegen generate -i gzrange-api.yaml -l scala
Steps to reproduce
Run swagger as above.
Edit build.sbt to have scalaVersion := "2.12.8" (or any 2.12.x)
sbt publishLocal
This will give an error for an unresolved dependency.
Related issues/PRs
https://github.com/swagger-api/swagger-codegen/issues/8520
Suggest a fix/enhancement
It appears that a replacement for swagger-async-httpclient is needed, or it needs to be rebuilt with scala 2.12.
Since scala 2.13 has also been released, a similar fix to generate scala 2.13 should also be applied.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported swagger-codegen generate command with -l scala and inspect the generated build.sbt, especially the Scala version and com.wordnik.swagger %% swagger-async-httpclient dependency. Check dependency availability for Scala 2.12 and 2.13, then verify that the generated project can publish locally with each supported version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100