diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/document.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/document.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/document.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/document.scala index e05e841..c584b96 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/document.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/sprayformats/document.scala @@ -34,7 +34,7 @@ object document { val name = fields .get("name") .map(_.convertTo[String]) - .getOrElse(deserializationError(s"Intervention type json object does not contain `name` field: $json")) + .getOrElse(deserializationError(s"Document type json object does not contain `name` field: $json")) DocumentType .fromString(name) @@ -126,7 +126,8 @@ object document { "previousAssignee" -> document.previousAssignee.toJson, "meta" -> document.meta.toJson, "lastActiveUser" -> document.lastActiveUserId.toJson, - "lastUpdate" -> document.lastUpdate.toJson + "lastUpdate" -> document.lastUpdate.toJson, + "labelVersion" -> document.labelVersion.toJson ) override def read(json: JsValue): Document = json match { @@ -185,7 +186,8 @@ object document { assignee = None, previousAssignee = None, lastActiveUserId = None, - lastUpdate = LocalDateTime.MIN + lastUpdate = LocalDateTime.MIN, + labelVersion = 0 ) case _ => deserializationError(s"Expected Json Object as Document, but got $json") |