RequestBody

data class RequestBody(val description: String? = null, val content: Map<@Serializable(with = ContentTypeSerializer::class) ContentType, MediaType>? = null, val required: Boolean = false, val extensions: ExtensionProperties? = null) : Extensible(source)

Describes the request body for an operation including content types, schemas, and whether it is required.

Report a problem

Constructors

Link copied to clipboard
constructor(description: String? = null, content: Map<@Serializable(with = ContentTypeSerializer::class) ContentType, MediaType>? = null, required: Boolean = false, extensions: ExtensionProperties? = null)

Types

Link copied to clipboard
class Builder(schemaInference: JsonSchemaInference, defaultContentTypes: List<ContentType>) : JsonSchemaInference

Builder for constructing a RequestBody description.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Map of media type to MediaType object, describing the request body content.

Link copied to clipboard

Optional description for the request body.

Link copied to clipboard
open override val extensions: ExtensionProperties?

Specification-extensions for this request body (keys must start with x-).

Link copied to clipboard

Whether the request body is required for this operation.