-
-
Notifications
You must be signed in to change notification settings - Fork 566
Closed
Description
Describe the bug
After upgrading from 2.8.14 to 3.0.0, Kotlin data class request object parameters that were previously correctly marked as required are no longer mandatory.
To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using?
4.0.0
What modules and versions of springdoc-openapi are you using?
springdoc-openapi-starter-webmvc-ui:3.0.0
Provide with a sample code (HelloController) or Test that reproduces the problem
Controller
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController
@RestController
class HelloController {
@GetMapping("/hello")
fun getFoo(tester: Tester): String = "Ok"
}
data class Tester(
val strOne: String,
)Expected behavior
"Tester": {
"type": "object",
"properties": {
"strOne": {
"type": "string"
}
},
"required": [
"strOne"
]
},Actual behavior
"Tester": {
"type": "object",
"properties": {
"strOne": {
"type": "string"
}
}
},Metadata
Metadata
Assignees
Labels
No labels