PathVariable

data class PathVariable<P : Any>(val name: String, val codec: StringCodec<P>) : Parameter<P> (source)

Required parameter rendered as a {name} segment inside the path template.

Path variables always remain required because omitting one would change the shape of the URI.

Constructors

Link copied to clipboard
constructor(name: String, codec: StringCodec<P>)

Properties

Link copied to clipboard
open override val codec: StringCodec<P>

Codec responsible for encoding and decoding parameter values.

Link copied to clipboard
open override val name: String

Canonical parameter name.

Link copied to clipboard
open override val position: ParameterPosition

Location of the parameter within the HTTP request.

Link copied to clipboard
open override val required: Boolean = true

Indicates whether the parameter must be supplied by the caller.