0

When your server have added new fields for response your client will fail if we don't let scalaxb know to ignore unknown fields its like @JsonIgnore in jackson.

frostcs
  • 353
  • 5
  • 10

1 Answers1

0

For this it has a very solution. Just add scalaxbIgnoreUnknown in (Compile, scalaxb) := true in your build tool sample code for build.sbt

```lazy val helloModule = (project in file(".")).settings(
commonSettings,
publishSetting,
scalaxbIgnoreUnknown in (Compile, scalaxb) := true,
scalaxbDispatchVersion in (Compile, scalaxb) := vDispatch,
scalaxbPackageName in (Compile, scalaxb)     := "com.hello.helloModule.client",
libraryDependencies := Seq(
      "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4",
      "org.scala-lang.modules" %% "scala-swing" % "2.0.0-M2",


      "net.databinder.dispatch" %% "dispatch-core" % vDispatch,
      "com.typesafe" % "config" % "1.3.1",
  "org.scala-lang.modules" %% "scala-xml" % "1.1.0"
    ),
name := "com.hello.helloModule.client").enablePlugins(ScalaxbPlugin)```
frostcs
  • 353
  • 5
  • 10
  • P.S you need to have scalaxb version greater than 1.4.0 Commit in scalaxb repo for support https://github.com/eed3si9n/scalaxb/pull/310 – frostcs Feb 22 '19 at 04:51