module Runcobo::Params::Json
Overview
Defines json params.
class JsonParamsExample < BaseAction
get "/params"
json NamedTuple(
id: Int64,
category: String,
user: NamedTuple(
email: String,
gender: Int32,
),
)
call do
sum = params[:user][:gender] + 6
render_plain "#{sum}: #{category}"
end
end