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
With Spring Boot + Kotlin, I can specify a default value for a request parameter in 2 ways:
//Using defaultValue attribute
fun getAll(@RequestParam(defaultValue = 1) page: Int) = ...
//Using Kotlin's default method argument value features
fun getAll(@RequestParam page: Int = 1) = ...
Both of these approaches works fine.
However, when the Open API docs are generated, the default value is showing up correctly only when getAll(@RequestParam(defaultValue = 1) page: Int) syntax is used, but not for getAll(@RequestParam page: Int = 1).
Please support generating the Swagger docs with default value when Kotlin's default value assignment syntax is used as well.
The text was updated successfully, but these errors were encountered:
With Spring Boot + Kotlin, I can specify a default value for a request parameter in 2 ways:
Both of these approaches works fine.
However, when the Open API docs are generated, the default value is showing up correctly only when
getAll(@RequestParam(defaultValue = 1) page: Int)
syntax is used, but not forgetAll(@RequestParam page: Int = 1)
.Please support generating the Swagger docs with default value when Kotlin's default value assignment syntax is used as well.
The text was updated successfully, but these errors were encountered: