io.quarkus.resteasy.reactive.kotlin.serialization.runtime.ValidationJsonBuilderCustomizer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-resteasy-reactive-kotlin-serialization Show documentation
Show all versions of quarkus-resteasy-reactive-kotlin-serialization Show documentation
Kotlin Serialization support for RESTEasy Reactive. This extension is not compatible with the quarkus-resteasy extension, or any of the extensions that depend on it.
package io.quarkus.resteasy.reactive.kotlin.serialization.runtime
import io.quarkus.resteasy.reactive.kotlin.serialization.common.JsonBuilderCustomizer
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.json.JsonBuilder
import kotlinx.serialization.modules.SerializersModule
import kotlinx.serialization.modules.contextual
import kotlinx.serialization.modules.plus
class ValidationJsonBuilderCustomizer : JsonBuilderCustomizer {
@ExperimentalSerializationApi
override fun customize(jsonBuilder: JsonBuilder) {
jsonBuilder.serializersModule =
jsonBuilder.serializersModule.plus(
SerializersModule {
contextual(ViolationReportSerializer)
contextual(ViolationReportViolationSerializer)
}
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy