Skip to content

Commit

Permalink
Update dependency com.cjbooms:fabrikt to v10.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and acanda committed Oct 3, 2023
1 parent 71d4aac commit ffc5147
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repositories {
}

dependencies {
implementation("com.cjbooms:fabrikt:10.3.0")
implementation("com.cjbooms:fabrikt:10.4.0")
testImplementation(kotlin("test"))
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.1")
}
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories {
}

dependencies {
implementation("com.cjbooms:fabrikt:10.3.0")
implementation("com.cjbooms:fabrikt:10.4.0")
implementation("com.squareup:kotlinpoet:1.14.2")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.1")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ fun addIgnoreUnknownPropertiesAnnotation(modelsDirectory: Path) {

private fun addAnnotation(file: Path) {
val import = "import ${JsonIgnoreProperties::class.qualifiedName}"
val annotation = "${JsonIgnoreProperties::class.simpleName}(${JsonIgnoreProperties::ignoreUnknown.name} = true)"
val annotation = "@${JsonIgnoreProperties::class.simpleName}(${JsonIgnoreProperties::ignoreUnknown.name} = true)"
val annotatedClass = file.readText()
.replaceFirst("import", "$import\nimport")
.replaceFirst("data class", "$annotation\ndata class")
.replaceFirst("public data class", "$annotation\npublic data class")
file.writeText(annotatedClass)
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ class IgnoreUnknownPropertiesProcessorTest : StringSpec({
|package a.b.models
|
|import com.fasterxml.jackson.annotation.JsonIgnoreProperties
|import com.fasterxml.jackson.annotation.JsonProperty
|import com.fasterxml.jackson.`annotation`.JsonProperty
|import javax.validation.constraints.NotNull
|import kotlin.Boolean
|
|JsonIgnoreProperties(ignoreUnknown = true)
|data class Dog(
|@JsonIgnoreProperties(ignoreUnknown = true)
|public data class Dog(
| @param:JsonProperty("isGoodBoy")
| @get:JsonProperty("isGoodBoy")
| @get:NotNull
| val isGoodBoy: Boolean = true
| public val isGoodBoy: Boolean = true,
|)
|
""".trimMargin()
Expand Down

0 comments on commit ffc5147

Please sign in to comment.