aboutsummaryrefslogtreecommitdiff
path: root/shared/src
diff options
context:
space:
mode:
Diffstat (limited to 'shared/src')
-rw-r--r--shared/src/main/scala/xyz/driver/core/CoreJsonFormats.scala9
-rw-r--r--shared/src/main/scala/xyz/driver/core/core.scala12
-rw-r--r--shared/src/main/scala/xyz/driver/core/rest/ContextHeaders.scala6
-rw-r--r--shared/src/main/scala/xyz/driver/core/rest/sorting.scala2
4 files changed, 17 insertions, 12 deletions
diff --git a/shared/src/main/scala/xyz/driver/core/CoreJsonFormats.scala b/shared/src/main/scala/xyz/driver/core/CoreJsonFormats.scala
index 68e741c..fd44162 100644
--- a/shared/src/main/scala/xyz/driver/core/CoreJsonFormats.scala
+++ b/shared/src/main/scala/xyz/driver/core/CoreJsonFormats.scala
@@ -189,7 +189,7 @@ trait CoreJsonFormats extends DerivedJsonProtocol {
override def write(value: T): JsValue = {
map.find(_._2 == value).map(_._1) match {
case Some(name) => JsString(name)
- case _ => serializationError(s"Value $value is not found in the mapping $map")
+ case _ => serializationError(s"Value $value is not found in the mapping $map")
}
}
@@ -205,7 +205,7 @@ trait CoreJsonFormats extends DerivedJsonProtocol {
def read(json: JsValue): T = json match {
case JsNumber(value) => create(value)
- case _ => deserializationError(s"Expected number as ${typeOf[T].getClass.getName}, but got " + json.toString)
+ case _ => deserializationError(s"Expected number as ${typeOf[T].getClass.getName}, but got " + json.toString)
}
}
@@ -288,7 +288,8 @@ trait CoreJsonFormats extends DerivedJsonProtocol {
}
}
- implicit def nonEmptyNameFormat[T](implicit nonEmptyStringFormat: JsonFormat[Refined[String, NonEmpty]]): RootJsonFormat[NonEmptyName[T]] =
+ implicit def nonEmptyNameFormat[T](
+ implicit nonEmptyStringFormat: JsonFormat[Refined[String, NonEmpty]]): RootJsonFormat[NonEmptyName[T]] =
new RootJsonFormat[NonEmptyName[T]] {
def write(name: NonEmptyName[T]) = JsString(name.value.value)
@@ -318,4 +319,4 @@ trait CoreJsonFormats extends DerivedJsonProtocol {
private[core] object CoreJsonFormats {
def unrecognizedValue(value: String, possibleValues: Seq[Any]): Nothing =
deserializationError(s"Unexpected value $value. Expected one of: ${possibleValues.mkString("[", ", ", "]")}")
-} \ No newline at end of file
+}
diff --git a/shared/src/main/scala/xyz/driver/core/core.scala b/shared/src/main/scala/xyz/driver/core/core.scala
index ea05829..d7bba00 100644
--- a/shared/src/main/scala/xyz/driver/core/core.scala
+++ b/shared/src/main/scala/xyz/driver/core/core.scala
@@ -118,15 +118,19 @@ package core {
implicit def nonEmptyNameOrdering[T]: Ordering[NonEmptyName[T]] = Ordering.by(_.value.value)
}
- @deprecated("Base64 formats are rarely used in core and will be removed. Please implement the wrapper type in " +
- "services, or open an issue if you think it should stay in core.", "driver-core 1.11.5")
+ @deprecated(
+ "Base64 formats are rarely used in core and will be removed. Please implement the wrapper type in " +
+ "services, or open an issue if you think it should stay in core.",
+ "driver-core 1.11.5")
final case class Revision[T](id: String)
object Revision {
implicit def revisionEqual[T]: Equal[Revision[T]] = Equal.equal[Revision[T]](_.id == _.id)
}
- @deprecated("Base64 formats are rarely used in core and will be removed. Please implement the wrapper type in " +
- "services, or open an issue if you think it should stay in core.", "driver-core 1.11.5")
+ @deprecated(
+ "Base64 formats are rarely used in core and will be removed. Please implement the wrapper type in " +
+ "services, or open an issue if you think it should stay in core.",
+ "driver-core 1.11.5")
final case class Base64(value: String)
}
diff --git a/shared/src/main/scala/xyz/driver/core/rest/ContextHeaders.scala b/shared/src/main/scala/xyz/driver/core/rest/ContextHeaders.scala
index 7efe84c..5e9ae3e 100644
--- a/shared/src/main/scala/xyz/driver/core/rest/ContextHeaders.scala
+++ b/shared/src/main/scala/xyz/driver/core/rest/ContextHeaders.scala
@@ -10,6 +10,6 @@ object ContextHeaders {
val OriginatingIpHeader: String = "X-Forwarded-For"
val ResourceCount: String = "X-Resource-Count"
val PageCount: String = "X-Page-Count"
- val TraceHeaderName = "Tracing-Trace-Id"
- val SpanHeaderName = "Tracing-Span-Id"
- } \ No newline at end of file
+ val TraceHeaderName = "Tracing-Trace-Id"
+ val SpanHeaderName = "Tracing-Span-Id"
+}
diff --git a/shared/src/main/scala/xyz/driver/core/rest/sorting.scala b/shared/src/main/scala/xyz/driver/core/rest/sorting.scala
index ccdf150..5b68d2a 100644
--- a/shared/src/main/scala/xyz/driver/core/rest/sorting.scala
+++ b/shared/src/main/scala/xyz/driver/core/rest/sorting.scala
@@ -32,4 +32,4 @@ object ListResponse {
Meta(itemsCount, pagination.pageNumber, pagination.pageSize)
}
-} \ No newline at end of file
+}