forked from loafle/openapi-generator-original
Merge branch 'jimschubert-scala_client_refactor'
This commit is contained in:
commit
2e8737908b
@ -87,6 +87,8 @@ public class ScalaClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
supportingFiles.add(new SupportingFile( "gradle-wrapper.jar",
|
||||
gradleWrapperPackage.replace( ".", File.separator ), "gradle-wrapper.jar") );
|
||||
|
||||
supportingFiles.add(new SupportingFile("build.sbt.mustache", "", "build.sbt"));
|
||||
|
||||
importMapping.remove("List");
|
||||
importMapping.remove("Set");
|
||||
importMapping.remove("Map");
|
||||
|
@ -0,0 +1,33 @@
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
version := "{{artifactVersion}}",
|
||||
name := "{{artifactId}}",
|
||||
organization := "{{groupId}}",
|
||||
scalaVersion := "2.11.8",
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.4.2",
|
||||
"com.sun.jersey" % "jersey-core" % "1.19",
|
||||
"com.sun.jersey" % "jersey-client" % "1.19",
|
||||
"com.sun.jersey.contribs" % "jersey-multipart" % "1.19",
|
||||
"org.jfarcand" % "jersey-ahc-client" % "1.0.5",
|
||||
"io.swagger" % "swagger-core" % "1.5.8",
|
||||
"joda-time" % "joda-time" % "2.2",
|
||||
"org.joda" % "joda-convert" % "1.2",
|
||||
"org.scalatest" %% "scalatest" % "2.2.4" % "test",
|
||||
"junit" % "junit" % "4.8.1" % "test"
|
||||
),
|
||||
|
||||
resolvers ++= Seq(
|
||||
Resolver.jcenterRepo,
|
||||
Resolver.mavenLocal
|
||||
),
|
||||
|
||||
scalacOptions := Seq(
|
||||
"-unchecked",
|
||||
"-deprecation",
|
||||
"-feature"
|
||||
),
|
||||
|
||||
publishArtifact in (Compile, packageDoc) := false
|
||||
)
|
33
samples/client/petstore/scala/build.sbt
Normal file
33
samples/client/petstore/scala/build.sbt
Normal file
@ -0,0 +1,33 @@
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
version := "1.0.0",
|
||||
name := "swagger-scala-client",
|
||||
organization := "io.swagger",
|
||||
scalaVersion := "2.11.8",
|
||||
|
||||
libraryDependencies ++= Seq(
|
||||
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.4.2",
|
||||
"com.sun.jersey" % "jersey-core" % "1.19",
|
||||
"com.sun.jersey" % "jersey-client" % "1.19",
|
||||
"com.sun.jersey.contribs" % "jersey-multipart" % "1.19",
|
||||
"org.jfarcand" % "jersey-ahc-client" % "1.0.5",
|
||||
"io.swagger" % "swagger-core" % "1.5.8",
|
||||
"joda-time" % "joda-time" % "2.2",
|
||||
"org.joda" % "joda-convert" % "1.2",
|
||||
"org.scalatest" %% "scalatest" % "2.2.4" % "test",
|
||||
"junit" % "junit" % "4.8.1" % "test"
|
||||
),
|
||||
|
||||
resolvers ++= Seq(
|
||||
Resolver.jcenterRepo,
|
||||
Resolver.mavenLocal
|
||||
),
|
||||
|
||||
scalacOptions := Seq(
|
||||
"-unchecked",
|
||||
"-deprecation",
|
||||
"-feature"
|
||||
),
|
||||
|
||||
publishArtifact in (Compile, packageDoc) := false
|
||||
)
|
@ -1,8 +1,8 @@
|
||||
package io.swagger.client.api
|
||||
|
||||
import io.swagger.client.model.Pet
|
||||
import java.io.File
|
||||
import io.swagger.client.model.ApiResponse
|
||||
import java.io.File
|
||||
import io.swagger.client.ApiInvoker
|
||||
import io.swagger.client.ApiException
|
||||
|
||||
|
@ -80,7 +80,6 @@ class PetApiTest extends FlatSpec with Matchers {
|
||||
}
|
||||
|
||||
it should "find pets by tag" in {
|
||||
println("finding by tags")
|
||||
api.findPetsByTags(List("tag1", "tag2")) match {
|
||||
case Some(pets) => {
|
||||
pets.foreach(pet => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user