From a997aa6539d1f0af4ab4fc395ff2033335da312a Mon Sep 17 00:00:00 2001 From: vlad Date: Fri, 30 Jun 2017 12:29:54 -0700 Subject: Latest PDS UI utils --- .../driver/pdsuidomain/formats/json/document/ApiDocument.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiDocument.scala') diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiDocument.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiDocument.scala index be9c65b..0fd96b3 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiDocument.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiDocument.scala @@ -28,7 +28,7 @@ object ApiDocument { private val statusFormat = Format( Reads.StringReads.filter(ValidationError("unknown status")) { case x if DocumentUtils.statusFromString.isDefinedAt(x) => true - case _ => false + case _ => false }, Writes.StringWrites ) @@ -47,8 +47,10 @@ object ApiDocument { (JsPath \ "previousStatus").formatNullable(statusFormat) and (JsPath \ "assignee").formatNullable[Long] and (JsPath \ "previousAssignee").formatNullable[Long] and - (JsPath \ "meta").formatNullable(Format(Reads { x => JsSuccess(Json.stringify(x)) }, Writes[String](Json.parse))) - ) (ApiDocument.apply, unlift(ApiDocument.unapply)) + (JsPath \ "meta").formatNullable(Format(Reads { x => + JsSuccess(Json.stringify(x)) + }, Writes[String](Json.parse))) + )(ApiDocument.apply, unlift(ApiDocument.unapply)) def fromDomain(document: Document): ApiDocument = { ApiDocument( -- cgit v1.2.3