Skip to content

Commit ac32ceb

Browse files
jimschubertwing328
authored andcommitted
[finch] Regenerate example
1 parent 7f2a2b8 commit ac32ceb

36 files changed

+769
-1670
lines changed

samples/server/petstore/finch/build.sbt

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,34 @@ resolvers += "Sonatype OSS Releases" at "http://oss.sonatype.org/content/reposit
2020

2121
Defaults.itSettings
2222

23-
scalacOptions += "-language:postfixOps"
23+
scalacOptions ++= Seq(
24+
"-deprecation",
25+
"-encoding", "UTF-8",
26+
"-feature",
27+
"-language:existentials",
28+
"-language:higherKinds",
29+
"-language:implicitConversions",
30+
"-unchecked",
31+
"-Yno-adapted-args",
32+
"-Ywarn-dead-code",
33+
"-Ywarn-numeric-widen",
34+
"-Xfuture",
35+
"-Xlint",
36+
// "-Ywarn-unused-import",
37+
"-language:postfixOps"
38+
)
2439

2540
lazy val `it-config-sbt-project` = project.in(file(".")).configs(IntegrationTest)
2641

2742
libraryDependencies ++= Seq(
28-
"com.github.finagle" %% "finch-core" % "0.9.3",
29-
"com.github.finagle" %% "finch-argonaut" % "0.9.3",
30-
"io.argonaut" %% "argonaut" % "6.1",
31-
"com.github.finagle" %% "finch-test" % "0.9.3" % "test",
32-
"org.scalacheck" %% "scalacheck" % "1.12.5" % "test",
33-
"org.scalatest" %% "scalatest" % "2.2.5" % "test"
43+
"com.github.finagle" %% "finch-core" % "0.12.0",
44+
"com.github.finagle" %% "finch-circe" % "0.12.0",
45+
"io.circe" %% "circe-generic" % "0.7.0",
46+
"io.circe" %% "circe-java8" % "0.7.0",
47+
"com.twitter" %% "util-core" % "6.40.0",
48+
"com.github.finagle" %% "finch-test" % "0.12.0" % "test",
49+
"org.scalacheck" %% "scalacheck" % "1.13.4" % "test",
50+
"org.scalatest" %% "scalatest" % "3.0.0" % "test"
3451
)
3552

3653
assemblyMergeStrategy in assembly := {
@@ -40,3 +57,5 @@ assemblyMergeStrategy in assembly := {
4057
val oldStrategy = (assemblyMergeStrategy in assembly).value
4158
oldStrategy(x)
4259
}
60+
61+
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)

samples/server/petstore/finch/project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ resolvers += Resolver.typesafeRepo("releases")
22

33
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
44

5-
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.4")
5+
// addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.4")
66

77
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")

samples/server/petstore/finch/src/main/scala/ApiResponse.scala

Lines changed: 0 additions & 22 deletions
This file was deleted.

samples/server/petstore/finch/src/main/scala/Category.scala

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 128 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,133 @@
11
package io.swagger.petstore
22

3+
// TODO: properly handle custom imports
4+
import java.io._
5+
import java.util.Date
6+
7+
import io.swagger.petstore.models._
8+
39
trait DataAccessor {
4-
// TODO: apiInfo -> apis -> operations = ???
5-
// NOTE: ??? throws a not implemented exception
6-
7-
/**
8-
*
9-
* @return A Unit
10-
*/
11-
def Pet_addPet(body: Pet): Unit = ???
12-
13-
/**
14-
*
15-
* @return A Unit
16-
*/
17-
def Pet_deletePet(petId: Long, apiKey: String): Unit = ???
18-
19-
/**
20-
*
21-
* @return A List[Pet]
22-
*/
23-
def Pet_findPetsByStatus(status: List[String]): List[Pet] = ???
24-
25-
/**
26-
*
27-
* @return A List[Pet]
28-
*/
29-
def Pet_findPetsByTags(tags: List[String]): List[Pet] = ???
30-
31-
/**
32-
*
33-
* @return A Pet
34-
*/
35-
def Pet_getPetById(petId: Long): Pet = ???
36-
37-
/**
38-
*
39-
* @return A Unit
40-
*/
41-
def Pet_updatePet(body: Pet): Unit = ???
42-
43-
/**
44-
*
45-
* @return A Unit
46-
*/
47-
def Pet_updatePetWithForm(petId: Long, name: String, status: String): Unit = ???
48-
49-
/**
50-
*
51-
* @return A ApiResponse
52-
*/
53-
def Pet_uploadFile(petId: Long, additionalMetadata: String, file: File): ApiResponse = ???
54-
55-
/**
56-
*
57-
* @return A Unit
58-
*/
59-
def Store_deleteOrder(orderId: String): Unit = ???
60-
61-
/**
62-
*
63-
* @return A Map[String, Int]
64-
*/
65-
def Store_getInventory(): Map[String, Int] = ???
66-
67-
/**
68-
*
69-
* @return A Order
70-
*/
71-
def Store_getOrderById(orderId: Long): Order = ???
72-
73-
/**
74-
*
75-
* @return A Order
76-
*/
77-
def Store_placeOrder(body: Order): Order = ???
78-
79-
/**
80-
*
81-
* @return A Unit
82-
*/
83-
def User_createUser(body: User): Unit = ???
84-
85-
/**
86-
*
87-
* @return A Unit
88-
*/
89-
def User_createUsersWithArrayInput(body: List[User]): Unit = ???
90-
91-
/**
92-
*
93-
* @return A Unit
94-
*/
95-
def User_createUsersWithListInput(body: List[User]): Unit = ???
96-
97-
/**
98-
*
99-
* @return A Unit
100-
*/
101-
def User_deleteUser(username: String): Unit = ???
102-
103-
/**
104-
*
105-
* @return A User
106-
*/
107-
def User_getUserByName(username: String): User = ???
108-
109-
/**
110-
*
111-
* @return A String
112-
*/
113-
def User_loginUser(username: String, password: String): String = ???
114-
115-
/**
116-
*
117-
* @return A Unit
118-
*/
119-
def User_logoutUser(): Unit = ???
120-
121-
/**
122-
*
123-
* @return A Unit
124-
*/
125-
def User_updateUser(username: String, body: User): Unit = ???
10+
// TODO: apiInfo -> apis -> operations = ???
11+
// NOTE: ??? throws a not implemented exception
12+
13+
/**
14+
*
15+
* @return A Unit
16+
*/
17+
def Pet_addPet(body: Pet): Unit = ???
18+
19+
/**
20+
*
21+
* @return A Unit
22+
*/
23+
def Pet_deletePet(petId: Long, apiKey: String): Unit = ???
24+
25+
/**
26+
*
27+
* @return A Seq[Pet]
28+
*/
29+
def Pet_findPetsByStatus(status: Seq[String]): Seq[Pet] = ???
30+
31+
/**
32+
*
33+
* @return A Seq[Pet]
34+
*/
35+
def Pet_findPetsByTags(tags: Seq[String]): Seq[Pet] = ???
36+
37+
/**
38+
*
39+
* @return A Pet
40+
*/
41+
def Pet_getPetById(petId: Long): Pet = ???
42+
43+
/**
44+
*
45+
* @return A Unit
46+
*/
47+
def Pet_updatePet(body: Pet): Unit = ???
48+
49+
/**
50+
*
51+
* @return A Unit
52+
*/
53+
def Pet_updatePetWithForm(petId: Long, name: String, status: String): Unit = ???
54+
55+
/**
56+
*
57+
* @return A ApiResponse
58+
*/
59+
def Pet_uploadFile(petId: Long, additionalMetadata: String, file: File): ApiResponse = ???
60+
61+
/**
62+
*
63+
* @return A Unit
64+
*/
65+
def Store_deleteOrder(orderId: String): Unit = ???
66+
67+
/**
68+
*
69+
* @return A Map[String, Int]
70+
*/
71+
def Store_getInventory(): Map[String, Int] = ???
72+
73+
/**
74+
*
75+
* @return A Order
76+
*/
77+
def Store_getOrderById(orderId: Long): Order = ???
78+
79+
/**
80+
*
81+
* @return A Order
82+
*/
83+
def Store_placeOrder(body: Order): Order = ???
84+
85+
/**
86+
*
87+
* @return A Unit
88+
*/
89+
def User_createUser(body: User): Unit = ???
90+
91+
/**
92+
*
93+
* @return A Unit
94+
*/
95+
def User_createUsersWithArrayInput(body: Seq[User]): Unit = ???
96+
97+
/**
98+
*
99+
* @return A Unit
100+
*/
101+
def User_createUsersWithListInput(body: Seq[User]): Unit = ???
102+
103+
/**
104+
*
105+
* @return A Unit
106+
*/
107+
def User_deleteUser(username: String): Unit = ???
108+
109+
/**
110+
*
111+
* @return A User
112+
*/
113+
def User_getUserByName(username: String): User = ???
114+
115+
/**
116+
*
117+
* @return A String
118+
*/
119+
def User_loginUser(username: String, password: String): String = ???
120+
121+
/**
122+
*
123+
* @return A Unit
124+
*/
125+
def User_logoutUser(): Unit = ???
126+
127+
/**
128+
*
129+
* @return A Unit
130+
*/
131+
def User_updateUser(username: String, body: User): Unit = ???
126132

127133
}

samples/server/petstore/finch/src/main/scala/Order.scala

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)