From 529eb91b2a4ef30ff5ce251684f5030e1a20929e Mon Sep 17 00:00:00 2001 From: John Naegle Date: Wed, 1 Feb 2017 09:38:06 -0600 Subject: [PATCH] Include delete request parmeters in generated documentation One of my API routes allows multiple objects to be deleted. In routing, it looks like this: ```ruby resources :posts do collection do delete :destroy end end ``` The generated examples from tests did not include the parameters. This patch treats :DELETE like PUT/POST/PATCH and includes the parameters in the generated examples --- lib/apipie/extractor/recorder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/apipie/extractor/recorder.rb b/lib/apipie/extractor/recorder.rb index f88b502e..d8bbeb81 100644 --- a/lib/apipie/extractor/recorder.rb +++ b/lib/apipie/extractor/recorder.rb @@ -38,7 +38,7 @@ def analyze_functional_test(test_context) @verb = request.request_method.to_sym @path = request.path @params = request.request_parameters - if [:POST, :PUT, :PATCH].include?(@verb) + if [:POST, :PUT, :PATCH, :DELETE].include?(@verb) @request_data = @params else @query = request.query_string