Skip to content

annotation Athena::Framework::Annotations::ParamConverter #

Applies an ATH::ParamConverter to a given argument.

See ATH::ParamConverter for more information on defining a param converter.

Fields#

  • name : String - The name of the argument that should be converted, may also be provided as the first positional argument.
  • converter : ATH::ParamConverter.class - The ATH::ParamConverter that should be used to convert this argument.

Example#

@[ATHA::Get(path: "/multiply/:num")]
@[ATHA::ParamConverter("num", converter: MultiplyConverter)]
def multiply(num : Int32) : Int32
  num
end