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

com.ancientlightstudios.quarkus.kotlin.openapi.models.openapi.RequestBody.kt Maven / Gradle / Ivy

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy