Matched JsonIgnore target and retention Jackson's @JsonIgnore values; suppressed compiler warnings; fixed using it on getters
This commit is contained in:
parent
f13d417549
commit
68c2606a22
|
@ -93,7 +93,7 @@ kotlin {
|
|||
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation("com.fasterxml.jackson.core:jackson-annotations:2.15.0")
|
||||
compileOnly("com.fasterxml.jackson.core:jackson-annotations:2.15.0")
|
||||
}
|
||||
}
|
||||
jvmTest { }
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
package net.codinux.banking.client.model.config
|
||||
|
||||
/**
|
||||
* Annotation to be able to apply Jackson's @com.fasterxml.jackson.annotation.JsonIgnore in common module
|
||||
*/
|
||||
// match the target and retention settings of Jackson's JsonIgnore annotation
|
||||
@Target(AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD, AnnotationTarget.PROPERTY_GETTER)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
expect annotation class JsonIgnore()
|
||||
|
|
|
@ -5,6 +5,7 @@ import net.codinux.banking.client.model.CustomerAccount
|
|||
import net.codinux.banking.client.model.config.JsonIgnore
|
||||
import net.codinux.banking.client.model.config.NoArgConstructor
|
||||
|
||||
@Suppress("RUNTIME_ANNOTATION_NOT_SUPPORTED")
|
||||
@NoArgConstructor
|
||||
open class GetAccountDataResponse(
|
||||
val customer: CustomerAccount
|
||||
|
|
|
@ -3,6 +3,7 @@ package net.codinux.banking.client.model.tan
|
|||
import net.codinux.banking.client.model.config.JsonIgnore
|
||||
import net.codinux.banking.client.model.config.NoArgConstructor
|
||||
|
||||
@Suppress("RUNTIME_ANNOTATION_NOT_SUPPORTED")
|
||||
@NoArgConstructor
|
||||
open class FlickerCode(
|
||||
val challengeHHD_UC: String,
|
||||
|
@ -10,7 +11,7 @@ open class FlickerCode(
|
|||
val decodingError: String? = null
|
||||
) {
|
||||
|
||||
@JsonIgnore
|
||||
@get:JsonIgnore
|
||||
val decodingSuccessful: Boolean
|
||||
get() = decodingError == null
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package net.codinux.banking.client.model.tan
|
|||
import net.codinux.banking.client.model.config.JsonIgnore
|
||||
import net.codinux.banking.client.model.config.NoArgConstructor
|
||||
|
||||
@Suppress("RUNTIME_ANNOTATION_NOT_SUPPORTED")
|
||||
@NoArgConstructor
|
||||
open class TanImage(
|
||||
val mimeType: String,
|
||||
|
@ -10,7 +11,7 @@ open class TanImage(
|
|||
val decodingError: String? = null
|
||||
) {
|
||||
|
||||
@JsonIgnore
|
||||
@get:JsonIgnore
|
||||
val decodingSuccessful: Boolean
|
||||
get() = decodingError == null
|
||||
|
||||
|
|
Loading…
Reference in New Issue