diff options
author | vlad <vlad@driver.xyz> | 2017-06-30 12:29:54 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-06-30 12:29:54 -0700 |
commit | a997aa6539d1f0af4ab4fc395ff2033335da312a (patch) | |
tree | 4f24529cd0beed94368caafdc0bdbb5677184851 /src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiDocument.scala | |
parent | 5832f63b84d7388441d1200f2442dc1e9de0225c (diff) | |
download | rest-query-a997aa6539d1f0af4ab4fc395ff2033335da312a.tar.gz rest-query-a997aa6539d1f0af4ab4fc395ff2033335da312a.tar.bz2 rest-query-a997aa6539d1f0af4ab4fc395ff2033335da312a.zip |
Latest PDS UI utils
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiDocument.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiDocument.scala | 8 |
1 files changed, 5 insertions, 3 deletions
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( |