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
@RestController
class HelloController {
@GetMapping("/hello")
fun hello() = Response(status = Response.Status.SUCCESS)
}
data class Response(@field:Schema(enumAsRef = true) val status: Status) {
enum class Status {
SUCCESS,
ERROR
}
}
Uh oh!
There was an error while loading. Please reload this page.
Good morning, evening!
Having
generates response schema ⬇ :
I expected ⬇ :
It can be achieved annotating an enum class with
Schema(enumAsRef = true)
but I'd prefer to annotate a data class property instead) 🙏🏼Here is a minimal, reproducible example
Versions:
The text was updated successfully, but these errors were encountered: