You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If dependency jackson-module-kotlin](com.fasterxml.jackson.module:jackson-module-kotlin) present in gradle (without any additional configuration) all kotlin properties startling with one letter and a word Index duplicated in swagger yaml.
Example:
data classResult(
valresult:Int,
valaIndex:Int,
valsomeIndex:Int,
valbIndex:Int
)
plugins {
id("org.springframework.boot") version "3.3.0"
id("io.spring.dependency-management") version "1.1.5"
kotlin("jvm") version "2.0.0"
kotlin("plugin.spring") version "2.0.0"
}
group = "org.example"
version = "0.0.1-SNAPSHOT"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-webflux")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin") // If comment this line the bug disappears
}
kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
Controller:
@RestController
class Controller {
@GetMapping
fun hello(): Result = Result(
result = 1,
aIndex = 2,
someIndex = 1,
bIndex = 3,
)
data class Result(
val result: Int,
val aIndex: Int,
val someIndex: Int,
val bIndex: Int
)
}
Expected behavior
Properties starting with ?Index not duplicated in lowercase.
Hi here!
If dependency
jackson-module-kotlin](com.fasterxml.jackson.module:jackson-module-kotlin)
present in gradle (without any additional configuration) all kotlin properties startling with one letter and a wordIndex
duplicated in swagger yaml.Example:
Generated as:
To Reproduce
Steps to reproduce the behavior:
gradle.kts:
Controller:
Expected behavior
Properties starting with
?Index
not duplicated in lowercase.Screenshots
UI:
Additional context
Archived app:
duplicatedproperties.zip
The text was updated successfully, but these errors were encountered: