nitrestful: update tests results
[nit.git] / tests / sav / nitrestful_args1.res
index e2947d2..c85bd0f 100644 (file)
@@ -1,19 +1,21 @@
 # This file is generated by nitrestful
 # Do not modify, instead refine the generated services.
-module restful_annot_rest
+module restful_annot_rest is
+       no_warning("parentheses")
+end
 
 import restful_annot
 
 redef class MyAction
        redef fun answer(request, truncated_uri)
        do
-               var verbs = truncated_uri.split("/")
-               if verbs.not_empty and verbs.first.is_empty then verbs.shift
+               var resources = truncated_uri.split("/")
+               if resources.not_empty and resources.first.is_empty then resources.shift
 
-               if verbs.length != 1 then return super
-               var verb = verbs.first
+               if resources.length != 1 then return super
+               var resource = resources.first
 
-               if verb == "foo" then
+               if (resource == "foo") then
                        var in_s = request.string_arg("s")
                        var out_s = in_s
 
@@ -27,7 +29,7 @@ redef class MyAction
                                return super
                        end
                        return foo(out_s, out_i, out_b)
-               else if verb == "bar" then
+               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