File tree 2 files changed +12
-2
lines changed
lib/rspec_api_documentation
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ Feature: Combined text
68
68
[
69
69
{
70
70
"resource": "Greetings",
71
+ "http_method": "GET",
72
+ "route": "/greetings",
71
73
"description": "Greeting your favorite gem",
72
74
"explanation": null,
73
75
"parameters": [
@@ -103,6 +105,8 @@ Feature: Combined text
103
105
},
104
106
{
105
107
"resource": "Greetings",
108
+ "http_method": "GET",
109
+ "route": "/greetings",
106
110
"description": "Greeting your favorite developers of your favorite gem",
107
111
"explanation": null,
108
112
"parameters": [
Original file line number Diff line number Diff line change @@ -81,14 +81,20 @@ def filename
81
81
"#{ basename } .json"
82
82
end
83
83
84
- def to_json
84
+ def as_json
85
85
{
86
86
:resource => resource_name ,
87
+ :http_method => http_method ,
88
+ :route => route ,
87
89
:description => description ,
88
90
:explanation => explanation ,
89
91
:parameters => respond_to? ( :parameters ) ? parameters : [ ] ,
90
92
:requests => requests
91
- } . to_json
93
+ }
94
+ end
95
+
96
+ def to_json
97
+ as_json . to_json
92
98
end
93
99
94
100
def requests
You can’t perform that action at this time.
0 commit comments