Skip to content

Multiplatform Ktor schema declarationopensavvy.spine.apiParametersParameter

Parameter

class Parameter<T>(val name: String, val defaultValue: T?)

A declared query parameter in an API schema.

See Parameters.

Constructors

Parameter

constructor(name: String, defaultValue: T?)

Properties

defaultValue

val defaultValue: T?

The value that is substituted in if the URL does not contain this parameter.

name

val name: String

Name of the parameter as it appears in the URL.

Functions

getValue

inline operator fun <T> Parameters.Parameter<T>.getValue(thisRef: Parameters, property: KProperty<*>): T

Internal method used by the parameter declaration syntax.

setValue

inline operator fun <T> Parameters.Parameter<T>.setValue(thisRef: Parameters, property: KProperty<*>, value: T)

Internal method used by the parameter declaration syntax.