Skip to content

Commit

Permalink
Merge pull request #145 from ScalaConsultants/zio-http-3.0.0-RC1
Browse files Browse the repository at this point in the history
Update zio-http to 3.0.0-RC1
  • Loading branch information
jczuchnowski authored Apr 27, 2023
2 parents e41f32f + feb2709 commit f89c339
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ val logbackClassicVersion = "1.4.7"
val postgresqlVersion = "42.6.0"
val testContainersVersion = "0.40.15"
val zioMockVersion = "1.0.0-RC11"
val zioHttpVersion = "0.0.5"
val zioHttpVersion = "3.0.0-RC1"
val quillVersion = "4.6.0"

// This build is for this Giter8 template.
Expand Down
2 changes: 1 addition & 1 deletion src/main/g8/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ val logbackClassicVersion = "1.4.7"
val postgresqlVersion = "42.6.0"
val testContainersVersion = "0.40.15"
val zioMockVersion = "1.0.0-RC11"
val zioHttpVersion = "0.0.5"
val zioHttpVersion = "3.0.0-RC1"
val quillVersion = "4.6.0.1"

lazy val root = (project in file("."))
Expand Down
4 changes: 2 additions & 2 deletions src/main/g8/default.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=zio-scala3-quickstart
description=This is a seed project that creates Scala 3 based ZIO application using zio-http, protoquill, caliban etc.
scala_version=3.2.1
description=This is a seed project that creates Scala 3 based ZIO application.
scala_version=3.2.2
organization=com.example
package=$organization$
4 changes: 2 additions & 2 deletions src/main/g8/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
- ./src/main/resources/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=quickstart-db
- POSTGRES_PASSWORD=12345
- POSTGRES_DB=items
ports:
- "5432:5432"
3 changes: 1 addition & 2 deletions src/main/g8/src/main/scala/$package$/api/Extensions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package $package$.api
import $package$.domain.ValidationError
import zio._
import zio.http._
import zio.http.model.Status
import zio.json._

private[api] object Extensions:
Expand All @@ -21,7 +20,7 @@ private[api] object Extensions:
def toResponseZIO(implicit ev: JsonEncoder[T]): UIO[Response] = toResponseZIO(Status.Ok)

def toResponseZIO(status: Status)(implicit ev: JsonEncoder[T]): UIO[Response] = ZIO.succeed {
Response.json(data.toJson).setStatus(status)
Response.json(data.toJson).withStatus(status)
}

def toEmptyResponseZIO: UIO[Response] = toEmptyResponseZIO(Status.NoContent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package $package$.api
import $package$.api.healthcheck.HealthCheckService
import zio._
import zio.http._
import zio.http.model.{ Method, Status }

object HealthCheckRoutes:

Expand Down
1 change: 0 additions & 1 deletion src/main/g8/src/main/scala/$package$/api/HttpRoutes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import $package$.application.ItemService
import $package$.domain._
import zio._
import zio.http._
import zio.http.model.{ Method, Status }
import zio.json._

object HttpRoutes extends JsonSupport:
Expand Down
1 change: 0 additions & 1 deletion src/main/g8/src/main/scala/$package$/api/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import $package$.api.Extensions._
import $package$.domain._
import zio._
import zio.http._
import zio.http.model.Status

private[api] object Utils:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package $package$.api

import $package$.api.healthcheck.HealthCheckServiceTest
import zio.http._
import zio.http.model.{ Headers, Method, Status }
import zio.test._
import zio.test.Assertion._

Expand Down

0 comments on commit f89c339

Please sign in to comment.