Skip to content

Commit

Permalink
OpenAPI to Endpoint code gen (#1520) (#2562)
Browse files Browse the repository at this point in the history
Add general data structure and logic for any endpoint code gen
  • Loading branch information
987Nabil authored Dec 20, 2023
1 parent d1e87cb commit f2f5378
Show file tree
Hide file tree
Showing 37 changed files with 3,134 additions and 127 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
run: sbt '++ ${{ matrix.scala }}' zioHttpShadedTests/test

- name: Compress target directories
run: tar cf targets.tar zio-http-cli/target target zio-http/target zio-http-docs/target zio-http-benchmarks/target zio-http-example/target zio-http-testkit/target project/target
run: tar cf targets.tar zio-http-cli/target target zio-http/target zio-http-docs/target zio-http-gen/target zio-http-benchmarks/target zio-http-example/target zio-http-testkit/target project/target

- name: Upload target directories
uses: actions/upload-artifact@v3
Expand Down
16 changes: 15 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import BuildHelper._
import Dependencies._
import Dependencies.{scalafmt, _}
import sbt.librarymanagement.ScalaArtifacts.isScala3
import scala.concurrent.duration._

Expand Down Expand Up @@ -118,6 +118,7 @@ lazy val aggregatedProjects: Seq[ProjectReference] =
zioHttp,
zioHttpBenchmarks,
zioHttpCli,
zioHttpGen,
zioHttpExample,
zioHttpTestkit,
docs,
Expand Down Expand Up @@ -237,6 +238,19 @@ lazy val zioHttpExample = (project in file("zio-http-example"))
.settings(libraryDependencies ++= Seq(`jwt-core`))
.dependsOn(zioHttp, zioHttpCli)

lazy val zioHttpGen = (project in file("zio-http-gen"))
.settings(stdSettings("zio-http-gen"))
.settings(publishSetting(true))
.settings(
libraryDependencies ++= Seq(
`zio`,
`zio-test`,
`zio-test-sbt`,
scalafmt.cross(CrossVersion.for3Use2_13),
),
)
.dependsOn(zioHttp)

lazy val zioHttpTestkit = (project in file("zio-http-testkit"))
.enablePlugins(Shading.plugins(): _*)
.settings(stdSettings("zio-http-testkit"))
Expand Down
2 changes: 2 additions & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ object Dependencies {
val `jwt-core` = "com.github.jwt-scala" %% "jwt-core" % JwtCoreVersion
val `scala-compact-collection` = "org.scala-lang.modules" %% "scala-collection-compat" % ScalaCompactCollectionVersion

val scalafmt = "org.scalameta" %% "scalafmt-dynamic" % "3.7.17"

val netty =
Seq(
"io.netty" % "netty-codec-http" % NettyVersion,
Expand Down
Loading

0 comments on commit f2f5378

Please sign in to comment.