From 9571916d544a65a6b9b5d6f917d8d9eef8652dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Sowa?= Date: Mon, 21 Aug 2023 20:04:52 +0200 Subject: [PATCH 1/4] Adding support for http4s-stir library. --- build.sbt | 40 ++++++++ .../Http4sStirRouteBaklavaSpec.scala | 10 ++ .../src/main/resources/reference.conf | 20 ++++ .../baklava/routes/BaklavaRoutes.scala | 95 +++++++++++++++++++ 4 files changed, 165 insertions(+) create mode 100644 http4sstir/src/main/scala/pl/iterators/baklava/http4sstir/Http4sStirRouteBaklavaSpec.scala create mode 100644 routes-http4s-stir/src/main/resources/reference.conf create mode 100644 routes-http4s-stir/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala diff --git a/build.sbt b/build.sbt index 471f5c1..af5fac8 100644 --- a/build.sbt +++ b/build.sbt @@ -43,6 +43,7 @@ lazy val baseSettings = Seq( val akkaV = "2.6.19" val akkaHttpV = "10.2.9" +val http4sStirV = "0.2" val typesafeConfigV = "1.4.2" val kebsV = "1.9.4" val reflectionsVersion = "0.10.2" @@ -72,6 +73,25 @@ lazy val routes = project } ) +lazy val routesHttp4sStir = project + .in(file("routes-http4s-stir")) + .settings(baseSettings: _*) + .settings( + name := "routes-http4s-stir", + moduleName := "baklava-routes-http4s-stir" + ) + .settings( + libraryDependencies ++= { + + Seq( + "pl.iterators" %% "http4s-stir" % http4sStirV, + "com.typesafe" % "config" % typesafeConfigV, + "org.webjars" % "webjars-locator" % webjarsLocatorV, + "org.webjars" % "swagger-ui" % swaggerUiV + ) + } + ) + lazy val core = project .in(file("core")) .settings(baseSettings: _*) @@ -191,6 +211,24 @@ lazy val akkahttp = project } ) +lazy val http4sstir = project + .in(file("http4sstir")) + .dependsOn(core % "compile->compile;test->test") + .settings(baseSettings: _*) + .settings( + name := "http4sstir", + moduleName := "baklava-http4sstir" + ) + .settings( + libraryDependencies ++= { + + Seq( + "pl.iterators" %% "http4s-stir" % http4sStirV, + "pl.iterators" %% "http4s-stir-testkit" % http4sStirV, + ) + } + ) + lazy val scalatest = project .in(file("scalatest")) .dependsOn(core % "compile->compile;test->test") @@ -260,6 +298,8 @@ lazy val baklava = project formatteropenapi, generator, akkahttp, + http4sstir, + routesHttp4sStir, scalatest, specs2, sbtplugin diff --git a/http4sstir/src/main/scala/pl/iterators/baklava/http4sstir/Http4sStirRouteBaklavaSpec.scala b/http4sstir/src/main/scala/pl/iterators/baklava/http4sstir/Http4sStirRouteBaklavaSpec.scala new file mode 100644 index 0000000..6c5069c --- /dev/null +++ b/http4sstir/src/main/scala/pl/iterators/baklava/http4sstir/Http4sStirRouteBaklavaSpec.scala @@ -0,0 +1,10 @@ +package pl.iterators.baklava.http4sstir + +import org.http4s.Method +import pl.iterators.baklava.core.fetchers.RouteBaklavaSpec +import pl.iterators.stir.testkit.RequestBuilding + +trait Http4sStirRouteBaklavaSpec extends RouteBaklavaSpec with RequestBuilding { + + lazy val TestRequest = new RequestBuilder(Method.fromString(routeRepresentation.method).toOption.get) +} diff --git a/routes-http4s-stir/src/main/resources/reference.conf b/routes-http4s-stir/src/main/resources/reference.conf new file mode 100644 index 0000000..d94da98 --- /dev/null +++ b/routes-http4s-stir/src/main/resources/reference.conf @@ -0,0 +1,20 @@ +baklavaRoutes { + enabled = "true" + enabled = ${?BAKLAVA_ROUTES_ENABLED} + + #Override this to set http basic auth for baklava routes + basicAuthUser = ${?BAKLAVA_ROUTES_BASIC_AUTH_USER} + basicAuthPassword = ${?BAKLAVA_ROUTES_BASIC_AUTH_PASSWORD} + + #Filesystem path where output of baklava is stored + fileSystemPath = "./target/baklava" + fileSystemPath = ${?BAKLAVA_ROUTES_FILESYSTEM_PATH} + + #HTTP serve prefix of baklava resources + publicPathPrefix = "/" + publicPathPrefix = ${?BAKLAVA_ROUTES_PUBLIC_PATH_PREFIX} + + #API prefix + apiPublicPathPrefix = "/v1" + apiPublicPathPrefix = ${?BAKLAVA_ROUTES_API_PUBLIC_PATH_PREFIX} +} diff --git a/routes-http4s-stir/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala b/routes-http4s-stir/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala new file mode 100644 index 0000000..284af5c --- /dev/null +++ b/routes-http4s-stir/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala @@ -0,0 +1,95 @@ +package pl.iterators.baklava.routes + +import cats.effect.IO +import org.http4s.headers.Location +import org.http4s.{Headers, Response, Status, Uri} +import pl.iterators.stir.server.Directives._ +import org.webjars.WebJarAssetLocator +import pl.iterators.stir.server.Route +import pl.iterators.stir.server.directives.{CredentialsHelper, RouteDirectives} + +import scala.io.Source +import scala.util.{Failure, Success, Try} + +object BaklavaRoutes { + def routes(config: com.typesafe.config.Config): Route = { + implicit val internalConfig: BaklavaRoutes.Config = BaklavaRoutes.Config(config) + if (internalConfig.enabled) + authenticateBasic("docs", basicAuthOpt) { _ => + pathPrefix("docs") { + pathSingleSlash { + getFromFile(s"${internalConfig.fileSystemPath}/simple/index.html") + } ~ getFromDirectory(s"${internalConfig.fileSystemPath}/simple") + } ~ path("openapi") { + complete(openApiFileContent) + } ~ pathPrefix("swagger-ui") { + swaggerWebJar + } ~ pathPrefix("swagger") { + get(complete(swaggerRedirectHttpResponse)) + } + } else + RouteDirectives.reject + } + + private def basicAuthOpt(credentials: CredentialsHelper)(implicit internalConfig: BaklavaRoutes.Config): Option[String] = + (internalConfig.basicAuthUser, internalConfig.basicAuthPassword) match { + case (Some(user), Some(password)) => + credentials match { + case p @ CredentialsHelper.Provided(id) if id == user && p.verify(password) => Some(id) + case _ => None + } + case _ => Some("") + } + + private def openApiFileContent(implicit internalConfig: BaklavaRoutes.Config): String = { + val source = Source.fromFile(s"${internalConfig.fileSystemPath}/openapi/openapi.yml") + val lines = source.getLines() + val firstLine = lines.next() + val serverConfig = List("servers:", s" - url: ${internalConfig.apiPublicPathPrefix}") + val tailLines = lines.toList + val content = firstLine :: serverConfig ::: tailLines + source.close() + content.mkString("\n") + } + + private def swaggerRedirectHttpResponse(implicit internalConfig: BaklavaRoutes.Config) = { + val swaggerUiUrl = s"${internalConfig.publicPathPrefix}swagger-ui/3.40.0/index.html" + val swaggerDocsUrl = s"${internalConfig.publicPathPrefix}openapi" + Response[IO](status = Status.SeeOther, + headers = Headers(Location(Uri.unsafeFromString(s"$swaggerUiUrl?url=$swaggerDocsUrl&layout=BaseLayout")))) + } + + private lazy val swaggerWebJar: Route = { + extractUnmatchedPath { path => + Try((new WebJarAssetLocator).getFullPath("swagger-ui", path.toString)) match { + case Success(fullPath) => + getFromResource(fullPath) + case Failure(_: IllegalArgumentException) => + reject + case Failure(e) => + failWith(e) + } + } + } + + private case class Config(enabled: Boolean, + basicAuthUser: Option[String], + basicAuthPassword: Option[String], + fileSystemPath: String, + publicPathPrefix: String, + apiPublicPathPrefix: String) + + private object Config { + def apply(config: com.typesafe.config.Config): Config = { + val c = config.getConfig("baklavaRoutes") + Config( + enabled = c.getBoolean("enabled"), + basicAuthUser = Try(c.getString("basicAuthUser")).toOption, + basicAuthPassword = Try(c.getString("basicAuthPassword")).toOption, + fileSystemPath = c.getString("fileSystemPath"), + publicPathPrefix = c.getString("publicPathPrefix"), + apiPublicPathPrefix = c.getString("apiPublicPathPrefix") + ) + } + } +} From 26d7b08cac28d6d8986578ae36b291d713fad4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Sowa?= Date: Tue, 22 Aug 2023 13:51:37 +0200 Subject: [PATCH 2/4] Bumping relevant versions. --- build.sbt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index af5fac8..e8c321a 100644 --- a/build.sbt +++ b/build.sbt @@ -41,14 +41,14 @@ lazy val baseSettings = Seq( crossScalaVersions := supportedScalaVersions ) -val akkaV = "2.6.19" -val akkaHttpV = "10.2.9" +val akkaV = "2.6.20" +val akkaHttpV = "10.2.10" val http4sStirV = "0.2" val typesafeConfigV = "1.4.2" -val kebsV = "1.9.4" +val kebsV = "1.9.5" val reflectionsVersion = "0.10.2" val specs2V = "4.16.1" -val jsonSchemaVersion = "0.7.9" +val jsonSchemaVersion = "0.7.11" val swaggerV = "2.1.6" val scalatestV = "3.2.12" val webjarsLocatorV = "0.45" @@ -84,10 +84,10 @@ lazy val routesHttp4sStir = project libraryDependencies ++= { Seq( - "pl.iterators" %% "http4s-stir" % http4sStirV, - "com.typesafe" % "config" % typesafeConfigV, - "org.webjars" % "webjars-locator" % webjarsLocatorV, - "org.webjars" % "swagger-ui" % swaggerUiV + "pl.iterators" %% "http4s-stir" % http4sStirV, + "com.typesafe" % "config" % typesafeConfigV, + "org.webjars" % "webjars-locator" % webjarsLocatorV, + "org.webjars" % "swagger-ui" % swaggerUiV ) } ) @@ -224,7 +224,7 @@ lazy val http4sstir = project Seq( "pl.iterators" %% "http4s-stir" % http4sStirV, - "pl.iterators" %% "http4s-stir-testkit" % http4sStirV, + "pl.iterators" %% "http4s-stir-testkit" % http4sStirV ) } ) From a806b5107979e47045d0413918c173ac539b3bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Sowa?= Date: Tue, 22 Aug 2023 15:51:31 +0200 Subject: [PATCH 3/4] sbt cleanup --- .../src/main/resources/reference.conf | 0 .../baklava/routes/BaklavaRoutes.scala | 0 .../akkahttp/AkkaHttpRouteBaklavaSpec.scala | 0 build.sbt | 77 +++++++++---------- .../baklava/formatter/OpenApiFormatter.scala | 0 .../JsonSchemaToSwaggerSchemaWorker.scala | 0 .../openapi/OpenApiFormatterWorker.scala | 0 .../openapi/builders/OpenApiBuilder.scala | 0 .../openapi/builders/OperationBuilder.scala | 0 .../openapi/builders/PathItemBuilder.scala | 0 .../OpenApiFormatterWorkerSpec.scala | 0 .../JsonSchemaToSwaggerSchemaWorkerSpec.scala | 0 .../src/main/resources/reference.conf | 0 .../baklava/routes/BaklavaRoutes.scala | 0 .../Http4sStirRouteBaklavaSpec.scala | 0 15 files changed, 38 insertions(+), 39 deletions(-) rename {routes-http4s-stir => akka-http-routes}/src/main/resources/reference.conf (100%) rename {routes => akka-http-routes}/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala (100%) rename {akkahttp => akka-http}/src/main/scala/pl/iterators/baklava/akkahttp/AkkaHttpRouteBaklavaSpec.scala (100%) rename {formatteropenapi => formatter-openapi}/src/main/scala/pl/iterators/baklava/formatter/OpenApiFormatter.scala (100%) rename {formatteropenapi => formatter-openapi}/src/main/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorker.scala (100%) rename {formatteropenapi => formatter-openapi}/src/main/scala/pl/iterators/baklava/formatter/openapi/OpenApiFormatterWorker.scala (100%) rename {formatteropenapi => formatter-openapi}/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OpenApiBuilder.scala (100%) rename {formatteropenapi => formatter-openapi}/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OperationBuilder.scala (100%) rename {formatteropenapi => formatter-openapi}/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/PathItemBuilder.scala (100%) rename {formatteropenapi => formatter-openapi}/src/test/scala/pl/iterators/baklava/formatter/OpenApiFormatterWorkerSpec.scala (100%) rename {formatteropenapi => formatter-openapi}/src/test/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorkerSpec.scala (100%) rename {routes => http4s-stir-routes}/src/main/resources/reference.conf (100%) rename {routes-http4s-stir => http4s-stir-routes}/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala (100%) rename {http4sstir => http4s-stir}/src/main/scala/pl/iterators/baklava/http4sstir/Http4sStirRouteBaklavaSpec.scala (100%) diff --git a/routes-http4s-stir/src/main/resources/reference.conf b/akka-http-routes/src/main/resources/reference.conf similarity index 100% rename from routes-http4s-stir/src/main/resources/reference.conf rename to akka-http-routes/src/main/resources/reference.conf diff --git a/routes/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala b/akka-http-routes/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala similarity index 100% rename from routes/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala rename to akka-http-routes/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala diff --git a/akkahttp/src/main/scala/pl/iterators/baklava/akkahttp/AkkaHttpRouteBaklavaSpec.scala b/akka-http/src/main/scala/pl/iterators/baklava/akkahttp/AkkaHttpRouteBaklavaSpec.scala similarity index 100% rename from akkahttp/src/main/scala/pl/iterators/baklava/akkahttp/AkkaHttpRouteBaklavaSpec.scala rename to akka-http/src/main/scala/pl/iterators/baklava/akkahttp/AkkaHttpRouteBaklavaSpec.scala diff --git a/build.sbt b/build.sbt index e8c321a..c928082 100644 --- a/build.sbt +++ b/build.sbt @@ -1,9 +1,8 @@ import com.jsuereth.sbtpgp.PgpKeys -val scala_2_12 = "2.12.17" val scala_2_13 = "2.13.10" val mainScalaVersion = scala_2_13 -val supportedScalaVersions = Seq(scala_2_12, scala_2_13) +val supportedScalaVersions = Seq(scala_2_13) ThisBuild / crossScalaVersions := supportedScalaVersions ThisBuild / scalaVersion := mainScalaVersion @@ -41,29 +40,28 @@ lazy val baseSettings = Seq( crossScalaVersions := supportedScalaVersions ) -val akkaV = "2.6.20" -val akkaHttpV = "10.2.10" -val http4sStirV = "0.2" -val typesafeConfigV = "1.4.2" -val kebsV = "1.9.5" -val reflectionsVersion = "0.10.2" -val specs2V = "4.16.1" -val jsonSchemaVersion = "0.7.11" -val swaggerV = "2.1.6" -val scalatestV = "3.2.12" -val webjarsLocatorV = "0.45" -val swaggerUiV = "3.40.0" //unfortunately we need to stuck with this version +val akkaV = "2.6.20" +val akkaHttpV = "10.2.10" +val http4sStirV = "0.2" +val typesafeConfigV = "1.4.2" +val kebsV = "1.9.5" +val reflectionsV = "0.10.2" +val specs2V = "4.16.1" +val jsonSchemaV = "0.7.11" +val swaggerV = "2.1.6" +val scalatestV = "3.2.12" +val webjarsLocatorV = "0.45" +val swaggerUiV = "3.40.0" //unfortunately we need to stuck with this version -lazy val routes = project - .in(file("routes")) +lazy val akkahttproutes = project + .in(file("akka-http-routes")) .settings(baseSettings: _*) .settings( - name := "routes", - moduleName := "baklava-routes" + name := "akka-http-routes", + moduleName := "baklava-akka-http-routes" ) .settings( libraryDependencies ++= { - Seq( "com.typesafe.akka" %% "akka-http" % akkaHttpV, "com.typesafe" % "config" % typesafeConfigV, @@ -73,12 +71,12 @@ lazy val routes = project } ) -lazy val routesHttp4sStir = project - .in(file("routes-http4s-stir")) +lazy val http4sstirroutes = project + .in(file("http4s-stir-routes")) .settings(baseSettings: _*) .settings( - name := "routes-http4s-stir", - moduleName := "baklava-routes-http4s-stir" + name := "http4s-stir-routes", + moduleName := "baklava-http4s-stir-routes" ) .settings( libraryDependencies ++= { @@ -105,9 +103,9 @@ lazy val core = project "pl.iterators" %% "kebs-tagged-meta" % kebsV, "pl.iterators" %% "kebs-jsonschema" % kebsV, "pl.iterators" %% "kebs-scalacheck" % kebsV, - "com.github.andyglow" %% "scala-jsonschema" % jsonSchemaVersion, - "com.github.andyglow" %% "scala-jsonschema-enumeratum" % jsonSchemaVersion, - "org.reflections" % "reflections" % reflectionsVersion, + "com.github.andyglow" %% "scala-jsonschema" % jsonSchemaV, + "com.github.andyglow" %% "scala-jsonschema-enumeratum" % jsonSchemaV, + "org.reflections" % "reflections" % reflectionsV, "org.specs2" %% "specs2-core" % specs2V % "test" ) } @@ -157,13 +155,13 @@ lazy val formatter = project ) lazy val formatteropenapi = project - .in(file("formatteropenapi")) + .in(file("formatter-openapi")) .dependsOn(core % "compile->compile;test->test") .dependsOn(formatter % "compile->compile;test->test") .settings(baseSettings: _*) .settings( - name := "formatteropenapi", - moduleName := "baklava-formatteropenapi" + name := "formatter-openapi", + moduleName := "baklava-formatter-openapi" ) .settings( libraryDependencies ++= { @@ -185,18 +183,18 @@ lazy val generator = project .settings( libraryDependencies ++= { Seq( - "org.reflections" % "reflections" % reflectionsVersion + "org.reflections" % "reflections" % reflectionsV ) } ) lazy val akkahttp = project - .in(file("akkahttp")) + .in(file("akka-http")) .dependsOn(core % "compile->compile;test->test") .settings(baseSettings: _*) .settings( - name := "akkahttp", - moduleName := "baklava-akkahttp" + name := "akka-http", + moduleName := "baklava-akka-http" ) .settings( libraryDependencies ++= { @@ -212,12 +210,12 @@ lazy val akkahttp = project ) lazy val http4sstir = project - .in(file("http4sstir")) + .in(file("http4s-stir")) .dependsOn(core % "compile->compile;test->test") .settings(baseSettings: _*) .settings( - name := "http4sstir", - moduleName := "baklava-http4sstir" + name := "http4s-stir", + moduleName := "baklava-http4s-stir" ) .settings( libraryDependencies ++= { @@ -226,7 +224,8 @@ lazy val http4sstir = project "pl.iterators" %% "http4s-stir" % http4sStirV, "pl.iterators" %% "http4s-stir-testkit" % http4sStirV ) - } + }, + crossScalaVersions := Seq(scala_2_13) ) lazy val scalatest = project @@ -290,7 +289,6 @@ lazy val sbtplugin = project lazy val baklava = project .in(file(".")) .aggregate( - routes, core, circe, sprayjson, @@ -298,8 +296,9 @@ lazy val baklava = project formatteropenapi, generator, akkahttp, + akkahttproutes, http4sstir, - routesHttp4sStir, + http4sstirroutes, scalatest, specs2, sbtplugin diff --git a/formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/OpenApiFormatter.scala b/formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/OpenApiFormatter.scala similarity index 100% rename from formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/OpenApiFormatter.scala rename to formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/OpenApiFormatter.scala diff --git a/formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorker.scala b/formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorker.scala similarity index 100% rename from formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorker.scala rename to formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorker.scala diff --git a/formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/OpenApiFormatterWorker.scala b/formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/OpenApiFormatterWorker.scala similarity index 100% rename from formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/OpenApiFormatterWorker.scala rename to formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/OpenApiFormatterWorker.scala diff --git a/formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OpenApiBuilder.scala b/formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OpenApiBuilder.scala similarity index 100% rename from formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OpenApiBuilder.scala rename to formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OpenApiBuilder.scala diff --git a/formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OperationBuilder.scala b/formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OperationBuilder.scala similarity index 100% rename from formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OperationBuilder.scala rename to formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/OperationBuilder.scala diff --git a/formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/PathItemBuilder.scala b/formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/PathItemBuilder.scala similarity index 100% rename from formatteropenapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/PathItemBuilder.scala rename to formatter-openapi/src/main/scala/pl/iterators/baklava/formatter/openapi/builders/PathItemBuilder.scala diff --git a/formatteropenapi/src/test/scala/pl/iterators/baklava/formatter/OpenApiFormatterWorkerSpec.scala b/formatter-openapi/src/test/scala/pl/iterators/baklava/formatter/OpenApiFormatterWorkerSpec.scala similarity index 100% rename from formatteropenapi/src/test/scala/pl/iterators/baklava/formatter/OpenApiFormatterWorkerSpec.scala rename to formatter-openapi/src/test/scala/pl/iterators/baklava/formatter/OpenApiFormatterWorkerSpec.scala diff --git a/formatteropenapi/src/test/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorkerSpec.scala b/formatter-openapi/src/test/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorkerSpec.scala similarity index 100% rename from formatteropenapi/src/test/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorkerSpec.scala rename to formatter-openapi/src/test/scala/pl/iterators/baklava/formatter/openapi/JsonSchemaToSwaggerSchemaWorkerSpec.scala diff --git a/routes/src/main/resources/reference.conf b/http4s-stir-routes/src/main/resources/reference.conf similarity index 100% rename from routes/src/main/resources/reference.conf rename to http4s-stir-routes/src/main/resources/reference.conf diff --git a/routes-http4s-stir/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala b/http4s-stir-routes/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala similarity index 100% rename from routes-http4s-stir/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala rename to http4s-stir-routes/src/main/scala/pl/iterators/baklava/routes/BaklavaRoutes.scala diff --git a/http4sstir/src/main/scala/pl/iterators/baklava/http4sstir/Http4sStirRouteBaklavaSpec.scala b/http4s-stir/src/main/scala/pl/iterators/baklava/http4sstir/Http4sStirRouteBaklavaSpec.scala similarity index 100% rename from http4sstir/src/main/scala/pl/iterators/baklava/http4sstir/Http4sStirRouteBaklavaSpec.scala rename to http4s-stir/src/main/scala/pl/iterators/baklava/http4sstir/Http4sStirRouteBaklavaSpec.scala From f68300ca91835c8f2ff47b4ae70a2bb1fdcc9a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Sowa?= Date: Tue, 22 Aug 2023 15:52:46 +0200 Subject: [PATCH 4/4] Dropping 2.12 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26a9c72..b6391e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.17, 2.13.10] + scala: [2.13.10] java: [adopt@1.8] runs-on: ${{ matrix.os }} steps: