Scalaxb v1.5.0 Release Notes
Release Date: 2017-03-10 // about 7 years ago-
๐ฅ breaking changes
- ๐ Fixes name clashes in typeclass instance by prefixing full package name. #385 by @anatoliykmetyuk
- 0๏ธโฃ The default value for using varargs is set to false.
- ๐ sbt-scalaxb is now an auto plugin. See below.
๐ bug fixes
- ๐ Fixes SOAP operations which use multiple implicit headers. #380 by @joshlreese
- ๐ Fixes SOAP header values composition. #381 by @coutoPL
- ๐ Fixes SOAP header parts code generation. #400 by @jankeesvanandel
- ๐ Fixes enum name conflicts. #386 by @anatoliykmetyuk
- ๐ Fixes enum parsing, for example
00
inxsd:byte
. #388 by @anatoliykmetyuk
โจ enhancements
- โ Adds
--mutable
option to generate mutable case classes. See below. - ๐ Uses type attribute to convert
xs:any
. #389 by @anatoliykmetyuk - โ Adds
--autopackages
option to pick package names automatically. #391 by @anatoliykmetyuk - โ Adds
--visitor
option to generate a Visitor for traversing over the generated case classes. #392 by @anatoliykmetyuk
sbt-scalaxb changes
๐ sbt-scalaxb for scalaxb 1.5.0 is changed to an auto plugin.
Instead of addingscalaxbSettings
and definingsourceGenerators in Compile
,
๐ enableScalaxbPlugin
instead. All other setting/task keys will be prefixed with "scalaxb".
๐ฆ For example,packageName
will now be calledscalaxbPackageName
.Before:
import ScalaxbKeys._ lazy val root = (project in file(".")). settings( name := "foo-project"). settings(scalaxbSettings). settings( sourceGenerators in Compile += (scalaxb in Compile).taskValue, packageName in (Compile, scalaxb) := "generated" // packageNames in (Compile, scalaxb) := Map(uri("http://something/") -> "something"), // logLevel in (Compile, scalaxb) := Level.Debug )
After:
lazy val root = (project in file(".")). enablePlugins(ScalaxbPlugin). settings( name := "foo-project", scalaxbPackageName in (Compile, scalaxb) := "generated" // scalaxbAutoPackages in (Compile, scalaxb) := true )
mutable case class
scalaxb 1.5.0 adds an option to generate mutable case classes.
case class Address(var name: String, var street: String, var city: String)
In sbt-scalaxb, this can be enabled as:
lazy val root = (project in file(".")). enablePlugins(ScalaxbPlugin). settings( name := "foo-project", scalaxbPackageName in (Compile, scalaxb) := "generated", scalaxbGenerateMutable in (Compile, scalaxb) := true )