io.cafienne.bounded.cargosample.httpapi.HttpJsonProtocol.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cargo-sample_2.12 Show documentation
Show all versions of cargo-sample_2.12 Show documentation
Scala and Akka based Domain Driven Design Framework
The newest version!
/*
* Copyright (C) 2016-2018 Cafienne B.V.
*/
package io.cafienne.bounded.cargosample.httpapi
import java.util.UUID
import io.cafienne.bounded.cargosample.domain.CargoDomainProtocol.RouteSpecification
import spray.json._
/**
* JSON protocol used by the http API.
* Contains specific protocol messages and the JSON serialization instructions for the Spray JSON format
* for all classes used with the http API.
*/
object HttpJsonProtocol extends DefaultJsonProtocol {
import io.cafienne.bounded.aggregate.ProtocolJsonProtocol._
import io.cafienne.bounded.cargosample.domain.CargoDomainJsonProtocol._
case class PlanCargo(trackingId: UUID, routeSpecification: RouteSpecification)
implicit val planCargoFmt = jsonFormat2(PlanCargo)
case class ErrorResponse(msg: String)
implicit val errorResponsFmt = jsonFormat1(ErrorResponse)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy