com.ancientlightstudios.quarkus.kotlin.openapi.models.openapi.RequestBody.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-maven-plugin Show documentation
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
A Maven plugin to use the OpenAPI generator.
package com.ancientlightstudios.quarkus.kotlin.openapi.models.openapi
import com.ancientlightstudios.quarkus.kotlin.openapi.models.openapi.schema.Schema
// TODO: support different media-types (xml, file etc)
sealed interface RequestBody {
val schema: Schema
val description: String?
val required: Boolean
}
data class RequestBodyDefinition(
override val schema: Schema,
override val description: String?,
override val required: Boolean
) : RequestBody
data class RequestBodyReference(
val targetName: String,
private val target: RequestBody,
private val descriptionOverride: String? = null
) : RequestBody by target {
override val description: String?
get() = descriptionOverride ?: target.description
}