All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.resteasy.reactive.kotlin.serialization.runtime.ValidationJsonBuilderCustomizer.kt Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 3.15.2
Show newest version
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