rspec_api_documentation-open_api 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 715c7eb6f581e21ecf38b924c65fe985c2cdb2d48ad65d7c4d008b63e5550a3c
|
4
|
+
data.tar.gz: a48399e81ecb38cd3bd2947581ed51c47b4fa11f003c020f9b5116846176f485
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7da4b2494eb96f88b9f36024c984da5b4f8bfffb41710a03c3e7ac4da75bf3f37e294a8cf8f9ea76ff55f75fec06efbaae1bbbb6e02a8e0ca5290c8c73b3b77a
|
7
|
+
data.tar.gz: 4ded2b9527a5983ef958427f2056cf70e40d2c1a2a4c194027ee0cd69bd5b2795acd971ea1dcaa1e515d0277ca85ef74679674149f1f22a8b4b437f79acadb03
|
@@ -116,7 +116,12 @@ module RspecApiDocumentation
|
|
116
116
|
swagger["paths"][route][method]["parameters"].push(param) unless has
|
117
117
|
end
|
118
118
|
desc = swagger["paths"][route][method]["description"] || ""
|
119
|
-
swagger["paths"][route][method]["description"] = desc + "- #{description}
|
119
|
+
swagger["paths"][route][method]["description"] = desc + "- #{description}"
|
120
|
+
if params.empty?
|
121
|
+
swagger["paths"][route][method]["description"] += "\n"
|
122
|
+
else
|
123
|
+
swagger["paths"][route][method]["description"] += ", <strong>Needed Parameters:</strong>\n - #{params.map{ |p| p['name'] }.join("\n - ")} \n"
|
124
|
+
end
|
120
125
|
swagger["paths"][route][method]["responses"] = responses
|
121
126
|
end
|
122
127
|
swagger["components"]["schemas"] = types
|
@@ -243,18 +248,22 @@ module RspecApiDocumentation
|
|
243
248
|
end
|
244
249
|
|
245
250
|
def info
|
246
|
-
RspecApiDocumentation.configuration.open_api[
|
251
|
+
(RspecApiDocumentation.configuration.open_api[:info] ||
|
252
|
+
RspecApiDocumentation.configuration.open_api["info"] ||
|
253
|
+
{
|
247
254
|
"version" => "1.0.0",
|
248
255
|
"title" => "Open API",
|
249
256
|
"description" => "Open API",
|
250
257
|
"contact" => {
|
251
258
|
"name" => "OpenAPI"
|
252
259
|
}
|
253
|
-
}
|
260
|
+
}).deep_stringify_keys
|
254
261
|
end
|
255
262
|
|
256
263
|
def servers
|
257
|
-
RspecApiDocumentation.configuration.open_api[
|
264
|
+
(RspecApiDocumentation.configuration.open_api[:servers] ||
|
265
|
+
RspecApiDocumentation.configuration.open_api["servers"] ||
|
266
|
+
[
|
258
267
|
{
|
259
268
|
"url" => "http://localhost:{port}",
|
260
269
|
"description" => "Development server",
|
@@ -264,7 +273,7 @@ module RspecApiDocumentation
|
|
264
273
|
}
|
265
274
|
}
|
266
275
|
}
|
267
|
-
]
|
276
|
+
]).deep_stringify_keys
|
268
277
|
end
|
269
278
|
end
|
270
279
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_api_documentation-open_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaditya Taparia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec_api_documentation
|