-
Notifications
You must be signed in to change notification settings - Fork 237
Breaking Changes
Vojtěch Habarta edited this page Feb 2, 2021
·
9 revisions
For all changes see release notes on Releases page.
- 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)
- 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>
- 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
- make root class
- Gson: excluding static fields by default #496
- use
excludeFieldsWithModifiers
parameter if you want to includestatic
fields
- use
- 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)
- Refactoring needed for Spring support breaks typescript-generator usage from Java (it should not break usage from Maven and Gradle)
- Custom type mapping with generics broke mapping of generic classes to non-generic types like
string
- 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 ofrequired
isfalse
.
- 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 examplebuild.dependsOn generateTypeScript
runs typescript-generator whenbuild
task is invoked (#161)
- TypeScript 2.4 is required by JAX-RS application client
- Deprecated
declarePropertiesAsOptional
parameter. It is replaced byoptionalProperties
parameter with valueall
. 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 usingjackson2Modules
parameter. ParameterdisableJackson2ModuleDiscovery
was effectively removed. See "Jackson2 modules" section in #183.
This page describes breaking changes after version 1.28.343. For older changes see Releases.