-
-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
Description
Use case
In our company, we provide REST API for users and use reactive Mono as a response for endpoints which return NO_CONTENT.
But in this case, user still see "{ }" as response body, which doesn't correlate with NO_CONTENT status
Describe the solution you'd like
Add new UnitSerializer which will return empty string by default for Unit objects
object UnitSerializer: StdSerializer<Unit>(Unit::class.java) {
private fun readResolve(): Any = UnitSerializer
override fun serialize(value: Unit, gen: JsonGenerator, provider: SerializerProvider) =
gen.writeString("")
}
Describe alternatives you've considered
No response
Additional context
No response