File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
lib/rspec_api_documentation Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ Feature: Combined text
6868 [
6969 {
7070 "resource": "Greetings",
71+ "http_method": "GET",
72+ "route": "/greetings",
7173 "description": "Greeting your favorite gem",
7274 "explanation": null,
7375 "parameters": [
@@ -103,6 +105,8 @@ Feature: Combined text
103105 },
104106 {
105107 "resource": "Greetings",
108+ "http_method": "GET",
109+ "route": "/greetings",
106110 "description": "Greeting your favorite developers of your favorite gem",
107111 "explanation": null,
108112 "parameters": [
Original file line number Diff line number Diff line change @@ -81,14 +81,20 @@ def filename
8181 "#{ basename } .json"
8282 end
8383
84- def to_json
84+ def as_json
8585 {
8686 :resource => resource_name ,
87+ :http_method => http_method ,
88+ :route => route ,
8789 :description => description ,
8890 :explanation => explanation ,
8991 :parameters => respond_to? ( :parameters ) ? parameters : [ ] ,
9092 :requests => requests
91- } . to_json
93+ }
94+ end
95+
96+ def to_json
97+ as_json . to_json
9298 end
9399
94100 def requests
You can’t perform that action at this time.
0 commit comments