Parameter

data class Parameter(    val name: String,     val in: Parameter.Location,     val schema: JsonSchema,     val description: String? = null,     val required: Boolean = true,     val deprecated: Boolean = false,     val allowEmptyValue: Boolean? = null,     val examples: Map<String, Parameter.Example>? = null)

Describes a single operation parameter https://spec.openapis.org/oas/v3.1.0#parameter-object

Parameters

name

The name of the parameter. Parameter names are case-sensitive.

in

The location of the parameter.

description

A brief description of the parameter.

required

Determines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.

deprecated

Specifies that a parameter is deprecated and SHOULD be transitioned out of usage.

allowEmptyValue

Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value.

Constructors

Link copied to clipboard
fun Parameter(    name: String,     in: Parameter.Location,     schema: JsonSchema,     description: String? = null,     required: Boolean = true,     deprecated: Boolean = false,     allowEmptyValue: Boolean? = null,     examples: Map<String, Parameter.Example>? = null)

Types

Link copied to clipboard
data class Example(val value: Any)
Link copied to clipboard
enum Location : Enum<Parameter.Location>

Properties

Link copied to clipboard
val allowEmptyValue: Boolean? = null
Link copied to clipboard
val deprecated: Boolean = false
Link copied to clipboard
val description: String? = null
Link copied to clipboard
val examples: Map<String, Parameter.Example>? = null
Link copied to clipboard
val in: Parameter.Location
Link copied to clipboard
val name: String
Link copied to clipboard
val required: Boolean = true
Link copied to clipboard
val schema: JsonSchema