# This file is generated by nitrestful # Do not modify, instead refine the generated services. module restful_annot_rest is no_warning("parentheses") end import restful_annot redef class MyAction redef fun answer(request, truncated_uri) do var resources = truncated_uri.split("/") if resources.not_empty and resources.first.is_empty then resources.shift if resources.length != 1 then return super var resource = resources.first if (resource == "foo") then var in_s = request.string_arg("s") var out_s = in_s var in_i = request.string_arg("i") var out_i = deserialize_arg(in_i) var in_b = request.string_arg("b") var out_b = deserialize_arg(in_b) if not out_s isa String or not out_i isa Int or not out_b isa Bool then return super end return foo(out_s, out_i, out_b) else if (resource == "api_name" or resource == "alt_name") and (request.method == "GET" or request.method == "PUT") then var in_s = request.string_arg("s") var out_s = in_s var in_i = request.string_arg("i") var out_i = deserialize_arg(in_i) var in_b = request.string_arg("b") var out_b = deserialize_arg(in_b) if not out_i isa nullable Int or not out_b isa nullable Bool then return super end return bar(out_s, out_i, out_b) end return super end end