Skip to content

abstract struct Athena::Routing::Params::ScalarParam
inherits Athena::Routing::Params::Param #

Extension of ART::Params::Param that allows for more granular validation of scalar parameters.

Direct known subclasses

Athena::Routing::Params::QueryParam(T) Athena::Routing::Params::RequestParam(T)

Class methods#

.new(name : String, has_default : Bool = false, incompatibles : Array(String)? = nil, requirements : AVD::Constraint | Array(AVD::Constraint) | Regex | Nil = nil, map : Bool = false, strict : Bool = true, nilable : Bool = false, key : String? = nil, description : String? = nil) #

View source

Methods#

#constraints : Array(AVD::Constraint) #

:inherit:

View source

#map? : Bool #

Denotes whether the #requirements should be applied to the whole value, or to each item a part of the value.

See the "Map" section of ARTA::QueryParam.

View source

#requirements : AVD::Constraint | Array(AVD::Constraint) | Regex | Nil #

Returns the requirements that the value is required to pass in order to be considered valid.

See the "Requirements" section of ARTA::QueryParam.

View source