Skip to content

Commit a0070c7

Browse files
authored
add common query params, enums and media upload support (#9)
1 parent cde4f68 commit a0070c7

File tree

3 files changed

+244
-95
lines changed

3 files changed

+244
-95
lines changed

.sbtopts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
-J-Xms3096m
2-
-J-Xmx3096m
1+
-J-Xms4096m
2+
-J-Xmx4096m
33
-J-Xss2m

build.sbt

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ lazy val sttpClient4Version = "4.0.0-RC1"
4848

4949
lazy val sttpClient3Version = "3.10.2"
5050

51-
lazy val zioVersion = "2.1.14"
51+
lazy val zioVersion = "2.1.15"
5252

53-
lazy val zioJsonVersion = "0.7.3"
53+
lazy val zioJsonVersion = "0.7.28"
5454

55-
lazy val jsoniterVersion = "2.33.0"
55+
lazy val jsoniterVersion = "2.33.2"
5656

5757
lazy val munitVersion = "1.0.2"
5858

@@ -215,18 +215,20 @@ def codegenTask(
215215
IO.createDirectory(outSrcDir)
216216

217217
val basePkgName = s"gcp.$apiName.$apiVersion.${httpSource}_${jsonCodec}_${arrayType}".toLowerCase()
218-
val cmd =
219-
List(
220-
s"./${cliBin.getPath()}",
221-
s"-specs=${resourcePath(s"${apiName}_$apiVersion.json")}",
222-
s"-out-dir=${outSrcDir.getPath()}",
223-
s"-out-pkg=$basePkgName",
224-
s"-http-source=$httpSource",
225-
s"-json-codec=$jsonCodec",
226-
s"-array-type=$arrayType"
227-
).mkString(" ")
228-
229-
cmd ! ProcessLogger(l => logger.info(l))
218+
219+
val errs = scala.collection.mutable.ListBuffer.empty[String]
220+
(List(
221+
s"./${cliBin.getPath()}",
222+
s"-specs=${resourcePath(s"${apiName}_$apiVersion.json")}",
223+
s"-out-dir=${outSrcDir.getPath()}",
224+
s"-out-pkg=$basePkgName",
225+
s"-http-source=$httpSource",
226+
s"-json-codec=$jsonCodec",
227+
s"-array-type=$arrayType"
228+
).mkString(" ") ! ProcessLogger(l => logger.info(l), e => errs += e)) match {
229+
case 0 => ()
230+
case c => throw new InterruptedException(s"Failure on code generation: ${errs.mkString("\n")}")
231+
}
230232

231233
val files = listFilesRec(List(outDir), Nil)
232234

0 commit comments

Comments
 (0)