module Athena::Routing::Params::ParamInterface

Overview

Represents a request parameter; e.x. query param, form data, a file, etc.

See ART::QueryParam and ART::RequestParam.

Direct including types

Defined in:

params/param_interface.cr

Instance Method Summary

Instance Method Detail

abstract def constraints : Array(AVD::Constraint) #

Returns the AVD::Constraints that should be used to validate the parameter's value.


[View source]
abstract def default #

Returns the value that should be used if #strict? is false and the parameter was not provided, defaulting to nil.


[View source]
abstract def description : String | Nil #

Returns a human readable summary of what the parameter is used for. In the future this may be used to supplement auto generated endpoint documentation.


[View source]
abstract def extract_value(request : HTTP::Request, default : _ = nil) #

Returns the self's value from the provided request, or default if it was not present.


[View source]
abstract def incompatibles : Array(String) | Nil #

Returns the parameters that may not be present at the same time as self. See ART::QueryParam@incompatibles.


[View source]
abstract def name : String #

Returns the name of the parameter, maps to the controller action argument name.


[View source]
abstract def strict? : Bool #

Denotes whether self should be processed strictly. See ART::QueryParam@strict.


[View source]