com.ancientlightstudios.quarkus.kotlin.openapi.PlainSerializationExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-kotlin-openapi Show documentation
Show all versions of quarkus-kotlin-openapi Show documentation
A support library providing shared classes that the generated code will use.
The newest version!
package com.ancientlightstudios.quarkus.kotlin.openapi
import org.jboss.resteasy.reactive.RestResponse
import java.math.BigDecimal
import java.math.BigInteger
import java.util.*
@Suppress("unused")
fun String.asString() = this
@Suppress("unused")
fun Int.asString() = this.toString()
@Suppress("unused")
fun UInt.asString() = this.toString()
@Suppress("unused")
fun Long.asString() = this.toString()
@Suppress("unused")
fun ULong.asString() = this.toString()
@Suppress("unused")
fun BigInteger.asString() = this.toString()
@Suppress("unused")
fun Float.asString() = this.toString()
@Suppress("unused")
fun Double.asString() = this.toString()
@Suppress("unused")
fun BigDecimal.asString() = this.toString()
@Suppress("unused")
fun Boolean.asString() = this.toString()
@Suppress("unused")
fun ByteArray.asString(): String = Base64.getEncoder().encodeToString(this)
fun RestResponse.ResponseBuilder.headers(name: String, value: Any?): RestResponse.ResponseBuilder {
when (value) {
is Collection<*> -> value.forEach { header(name, it) }
else -> header(name, value)
}
return this
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy