Skip to content

Commit

Permalink
Merge branch 'master' into update/sbt-1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kciesielski authored May 7, 2024
2 parents 9231dfb + 20357c7 commit 5406a52
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import scala.concurrent.duration.DurationInt
import scala.sys.process.Process

val scala2_12 = "2.12.19"
val scala2_13 = "2.13.13"
val scala2_13 = "2.13.14"
val scala3 = "3.3.3"

// The `idea.managed` property is set automatically by IntelliJ when it runs sbt for build or import
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
lazy val root = (project in file("."))
.enablePlugins(OpenapiCodegenPlugin)
.settings(
scalaVersion := "2.13.13",
scalaVersion := "2.13.14",
version := "0.1"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
lazy val root = (project in file("."))
.enablePlugins(OpenapiCodegenPlugin)
.settings(
scalaVersion := "2.13.13",
scalaVersion := "2.13.14",
version := "0.1"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
lazy val root = (project in file("."))
.enablePlugins(OpenapiCodegenPlugin)
.settings(
scalaVersion := "2.13.13",
scalaVersion := "2.13.14",
version := "0.1"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
lazy val root = (project in file("."))
.enablePlugins(OpenapiCodegenPlugin)
.settings(
scalaVersion := "2.13.13",
scalaVersion := "2.13.14",
version := "0.1",
openapiJsonSerdeLib := "jsoniter"
)
Expand All @@ -25,7 +25,8 @@ TaskKey[Unit]("check") := {
val generatedCode =
Source.fromFile("target/scala-2.13/src_managed/main/sbt-openapi-codegen/TapirGeneratedEndpoints.scala").getLines.mkString("\n")
val expected = Source.fromFile("Expected.scala.txt").getLines.mkString("\n")
val generatedTrimmed = generatedCode.linesIterator.zipWithIndex.filterNot(_._1.forall(_.isWhitespace)).map{ case (a, i) => a.trim -> i }.toSeq
val generatedTrimmed =
generatedCode.linesIterator.zipWithIndex.filterNot(_._1.forall(_.isWhitespace)).map { case (a, i) => a.trim -> i }.toSeq
val expectedTrimmed = expected.linesIterator.filterNot(_.forall(_.isWhitespace)).map(_.trim).toSeq
if (generatedTrimmed.size != expectedTrimmed.size)
sys.error(s"expected ${expectedTrimmed.size} non-empty lines, found ${generatedTrimmed.size}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
lazy val root = (project in file("."))
.enablePlugins(OpenapiCodegenPlugin)
.settings(
scalaVersion := "2.13.13",
scalaVersion := "2.13.14",
version := "0.1",
openapiPackage := "com.example.generated.apis",
openapiObject := "MyExampleEndpoints",
Expand All @@ -18,7 +18,9 @@ TaskKey[Unit]("check") := {
val reference = Source.fromFile("example_swagger.yaml").getLines.mkString("\n")
val out = Source.fromFile("target/swagger.yaml").getLines.mkString("\n")
if (out != reference) {
sys.error("unexpected output:\n" + out + "\n== Out diff ref ==\n" + (out diff reference) + "\n== Ref diff out ==\n" + (reference diff out))
sys.error(
"unexpected output:\n" + out + "\n== Out diff ref ==\n" + (out diff reference) + "\n== Ref diff out ==\n" + (reference diff out)
)
}
()
}
2 changes: 1 addition & 1 deletion project/Versions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ object Versions {
val vertx = "4.5.7"
val jsScalaJavaTime = "2.5.0"
val nativeScalaJavaTime = "2.4.0-M3"
val jwtScala = "10.0.0"
val jwtScala = "10.0.1"
val derevo = "0.13.0"
val newtype = "0.4.4"
val monixNewtype = "0.2.3"
Expand Down

0 comments on commit 5406a52

Please sign in to comment.