Skip to content

Commit

Permalink
Merge pull request #117 from hmrc/API-7910
Browse files Browse the repository at this point in the history
API-7910: Upgrade to latest common-domain library + evergreening
  • Loading branch information
mi-akram authored Nov 15, 2024
2 parents bc34ba1 + b8dc5b5 commit b007af5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package uk.gov.hmrc.apisubscriptionfields.controller

import scala.concurrent.Future
import scala.reflect.ClassTag
import scala.util.{Failure, Success, Try}

import play.api.libs.json._
Expand All @@ -29,7 +30,7 @@ import uk.gov.hmrc.apisubscriptionfields.utils.ApplicationLogger

trait CommonController extends BackendBaseController with ApplicationLogger {

override protected def withJsonBody[T](f: (T) => Future[Result])(implicit request: Request[JsValue], m: Manifest[T], reads: Reads[T]): Future[Result] = {
override protected def withJsonBody[T](f: T => Future[Result])(implicit request: Request[JsValue], ct: ClassTag[T], reads: Reads[T]): Future[Result] = {
Try(request.body.validate[T]) match {
case Success(JsSuccess(payload, _)) => f(payload)
case Success(JsError(errs)) => jsonError(JsError.toJson(errs).toString())
Expand Down
14 changes: 0 additions & 14 deletions conf/application-json-logger.xml

This file was deleted.

16 changes: 8 additions & 8 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import sbt._
object AppDependencies {
def apply(): Seq[ModuleID] = dependencies ++ testDependencies

private lazy val mongoVersion = "1.7.0"
private lazy val bootstrapVersion = "8.4.0"
val commonDomainVersion = "0.13.0"
private lazy val mongoVersion = "2.1.0"
private lazy val bootstrapVersion = "9.5.0"
val commonDomainVersion = "0.17.0"

private lazy val dependencies = Seq(
"uk.gov.hmrc" %% "bootstrap-backend-play-30" % bootstrapVersion,
Expand All @@ -18,11 +18,11 @@ object AppDependencies {
)

private lazy val testDependencies = Seq(
"uk.gov.hmrc" %% "bootstrap-test-play-30" % bootstrapVersion,
"uk.gov.hmrc.mongo" %% "hmrc-mongo-test-play-30" % mongoVersion,
"uk.gov.hmrc" %% "api-platform-test-common-domain" % commonDomainVersion,
"org.pegdown" % "pegdown" % "1.6.0",
"org.mockito" %% "mockito-scala-scalatest" % "1.17.30"
"uk.gov.hmrc" %% "bootstrap-test-play-30" % bootstrapVersion,
"uk.gov.hmrc.mongo" %% "hmrc-mongo-test-play-30" % mongoVersion,
"uk.gov.hmrc" %% "api-platform-common-domain-fixtures" % commonDomainVersion,
"org.pegdown" % "pegdown" % "1.6.0",
"org.mockito" %% "mockito-scala-scalatest" % "1.17.30"
).map(d => d % "test")
}

6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.22.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.5.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.1")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.15")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.5")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "2.0.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.13.0")

ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always

0 comments on commit b007af5

Please sign in to comment.