Skip to content

Commit 9c419b5

Browse files
committed
fix: annotate all organisation resources with an ignore unknown keys annotation
1 parent 59c2328 commit 9c419b5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/kotlin/com/ctrlhub/core/governance/response/Organisation.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class OrganisationCollection {
1717
}
1818

1919
@Type("organisations")
20+
@JsonIgnoreProperties(ignoreUnknown = true)
2021
class Organisation {
2122
@Id(StringIdHandler::class)
2223
lateinit var id: String
@@ -37,13 +38,15 @@ class Settings {
3738
/**
3839
* Not to be confused with OrganisationResponseMeta
3940
*/
41+
@JsonIgnoreProperties(ignoreUnknown = true)
4042
class OrganisationMeta {
4143
@JsonProperty("created_at")
4244
@JsonDeserialize(using = JacksonLocalDateTimeDeserializer::class)
4345
var createdAt: LocalDateTime? = null
4446
lateinit var status: String
4547
}
4648

49+
@JsonIgnoreProperties(ignoreUnknown = true)
4750
class OrganisationResponseMeta {
4851
lateinit var counts: OrganisationResponseMetaCounts
4952
@JsonProperty("created_at")
@@ -52,23 +55,29 @@ class OrganisationResponseMeta {
5255
lateinit var status: String
5356
}
5457

58+
@JsonIgnoreProperties(ignoreUnknown = true)
5559
class OrganisationResponseMetaCounts {
5660
var limit: Int = 0
5761
}
5862

63+
@JsonIgnoreProperties(ignoreUnknown = true)
5964
class OrganisationResponseMetaPage {
6065
var limit: Int = 0
6166
var offset: Int = 0
6267
}
6368

69+
@JsonIgnoreProperties(ignoreUnknown = true)
6470
class Nomenclature {
6571
lateinit var governance: GovernanceNomenclature
6672
}
6773

74+
@JsonIgnoreProperties(ignoreUnknown = true)
6875
class SchemesNomenclature : AbstractNomenclatureEntry()
76+
@JsonIgnoreProperties(ignoreUnknown = true)
6977
class WorkOrdersNomenclature : AbstractNomenclatureEntry()
78+
@JsonIgnoreProperties(ignoreUnknown = true)
7079
class OperationsNomenclature : AbstractNomenclatureEntry()
71-
80+
@JsonIgnoreProperties(ignoreUnknown = true)
7281
class GovernanceNomenclature {
7382
var schemes: List<SchemesNomenclature>? = null
7483
@JsonProperty("work_orders") var workOrders: List<WorkOrdersNomenclature>? = null

0 commit comments

Comments
 (0)