Skip to content

2.10

Latest

Choose a tag to compare

@inponomarev inponomarev released this 29 Jun 15:51

🚀 Highlights

  • Generated code is now verified to compile. Until now the test suite only
    compared the generated Java/Kotlin against text snapshots; it never checked
    that the output was valid, compilable code. A new in-process compilation
    harness now compiles every generated source as part of the tests — Java via
    the JDK compiler (javax.tools, with Lombok annotation processing) and Kotlin
    via kotlin-compiler-embeddable — guarding against generators that emit
    uncompilable code and making larger refactorings safer. (#511)

  • The generated date (de)serializers are now exercised at runtime. The
    ZonedDateTime serializer/deserializer that the generator emits for
    date-time fields is compiled, loaded and round-tripped through Jackson in a
    functional test — including the offset-less fallback. (#511)

🐞 Bug fixes

  • Kotlin: subclasses of a discriminated base type now compile. When a base
    schema declared a required property (e.g. a discriminated allOf hierarchy
    with a shared base property), the generated Kotlin subclasses called the base
    constructor with no arguments and failed to compile
    (No value passed for parameter '…'). Inherited base constructor properties
    are now re-declared as override val … and forwarded to the base
    constructor. Java output was already correct. (#512)

💼 Maintenance & dependencies

  • Dependencies updates

Compatibility

  • No breaking changes to the plugin configuration or generated API.
  • Kotlin output for discriminated allOf hierarchies changes shape (subclasses
    now carry override val base properties); regenerate and recompile downstream
    Kotlin projects.

Full changelog: 2.9...2.10