From c2f653bc80ec5abf0b482aa1bf80e82dffd2e37d Mon Sep 17 00:00:00 2001 From: adityashedge Date: Wed, 20 May 2015 23:06:50 +0530 Subject: [PATCH] added 'route' url and http 'method' for all JsonIndex examples - store route and http method in JsonIndex to show on index page - this can make understanding the API request simpler - no need to check detailed info of API request --- lib/rspec_api_documentation/writers/json_writer.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rspec_api_documentation/writers/json_writer.rb b/lib/rspec_api_documentation/writers/json_writer.rb index 6c956083..730426ea 100644 --- a/lib/rspec_api_documentation/writers/json_writer.rb +++ b/lib/rspec_api_documentation/writers/json_writer.rb @@ -51,7 +51,9 @@ def section_hash(section) { :description => example.description, :link => "#{example.dirname}/#{example.filename}", - :groups => example.metadata[:document] + :groups => example.metadata[:document], + :route => example.route, + :method => example.metadata[:method] } } }