Skip to content

Breaking Changes

Vojtěch Habarta edited this page Feb 2, 2021 · 9 revisions

For all changes see release notes on Releases page.

Version 2.28.785 (2021-01-02)

  • Tagged unions generated for EXISTING_PROPERTY discriminant (#582)
    • if this feature is not desireable you can use disableTaggedUnionAnnotations parameter to disable it for classes annotated with specified annotation(s)

Version 2.27.744 (2020-11-17)

  • Read-only and write-only properties (Jackson2, JSDoc tags) (#579)
    • this change can produce unexpected properties (those detected by deserializer), if you don't want those properties you can configure visibility of setters and creators using jackson2Configuration parameter

Gradle sample

generateTypeScript {
    jsonLibrary = 'jackson2'
    jackson2Configuration = [
        setterVisibility: 'NONE'
        creatorVisibility: 'NONE'
    ]
}

Maven sample

<configuration>
    <jsonLibrary>jackson2</jsonLibrary>
    <jackson2Configuration>
        <setterVisibility>NONE</setterVisibility>
        <creatorVisibility>NONE</creatorVisibility>
    </jackson2Configuration>
</configuration>

Version 2.25.695 (2020-08-05)

  • Jackson2 tagged unions: including root class of hierarchy in union #497
    • make root class abstract if you don't want discriminant value for this class to be included in union
  • Gson: excluding static fields by default #496
    • use excludeFieldsWithModifiers parameter if you want to include static fields

Version 2.16.538 (2019-07-30)

  • Tagged unions are not generated for classes with duplicate property from Jackson @JsonTypeInfo annotation (#392)
  • New syntax for generic classes in customTypeMappings parameter (#384)
  • AxiosClientExtension updated to axios 0.19.0 (#379)

Version 2.13.489 (2019-04-03)

  • Refactoring needed for Spring support breaks typescript-generator usage from Java (it should not break usage from Maven and Gradle)

Version 2.10.466 (2018-12-03)

  • Custom type mapping with generics broke mapping of generic classes to non-generic types like string

Version 2.7.447 (2018-09-26)

  • When overriding property type using @ApiModelProperty.dataType annotation now @ApiModelProperty.required is used for determining property optionality. This means that now such properties are optional by default because default value of required is false.

Version 2.0.400 (2018-01-07)

  • Java 8 or higher is required
  • Gradle plugin (typescript-generator-gradle-plugin) no longer adds dependency on generateTypeScript task so users had to add dependency from some task in their build files if needed, for example build.dependsOn generateTypeScript runs typescript-generator when build task is invoked (#161)

Version 1.30.381 (2017-12-06)

  • TypeScript 2.4 is required by JAX-RS application client

Version 1.29.355 (2017-10-02)

  • Deprecated declarePropertiesAsOptional parameter. It is replaced by optionalProperties parameter with value all. See #183.
  • Jackson2 modules are not discovered and loaded now. This can be turned on explicitly using jackson2ModuleDiscovery parameter or modules can be specified individually using jackson2Modules parameter. Parameter disableJackson2ModuleDiscovery was effectively removed. See "Jackson2 modules" section in #183.

This page describes breaking changes after version 1.28.343. For older changes see Releases.