rspec_api_documentation-open_api 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08c1be1065742c4ce2f1d1d8e26f225cd8dcd664a8433a81a1da5392dd4ae74c'
|
|
4
|
+
data.tar.gz: 64a2fb1e193248d5d5eeaa777d528fb3a800afd7fd047d4f7d1a71f878614d12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1c9995f8be046c821e2c8782ca1502473b023a1536783440558e33b42c10b3b0f25ba95c6ec585288cf1c21ea229cd473de6887a4dc1b92d8ebd0ef565b1e72
|
|
7
|
+
data.tar.gz: 16abf0d6889783983dfbb3661dab7cb5fe9cc218bcf222de68ccbf59c6f80ce26397a683acaf065531865cdfcb766f35dc942e166f740367ad659415f3c87488
|
data/.gitignore
CHANGED
|
@@ -8,6 +8,8 @@ module RspecApiDocumentation
|
|
|
8
8
|
class OpenApiWriter < Writer
|
|
9
9
|
attr_writer :types, :swagger
|
|
10
10
|
|
|
11
|
+
RspecApiDocumentation::Configuration.add_setting :open_api, default: {}
|
|
12
|
+
|
|
11
13
|
def write
|
|
12
14
|
File.open(configuration.docs_dir.join("open_api.json"), "w") do |f|
|
|
13
15
|
f.write JSON.pretty_generate(get_hash)
|
|
@@ -241,7 +243,7 @@ module RspecApiDocumentation
|
|
|
241
243
|
end
|
|
242
244
|
|
|
243
245
|
def info
|
|
244
|
-
RspecApiDocumentation.configuration.open_api
|
|
246
|
+
RspecApiDocumentation.configuration.open_api["host"] || {
|
|
245
247
|
"version" => "1.0.0",
|
|
246
248
|
"title" => "Open API",
|
|
247
249
|
"description" => "Open API",
|
|
@@ -252,7 +254,7 @@ module RspecApiDocumentation
|
|
|
252
254
|
end
|
|
253
255
|
|
|
254
256
|
def servers
|
|
255
|
-
RspecApiDocumentation.configuration.open_api
|
|
257
|
+
RspecApiDocumentation.configuration.open_api["server"] || [
|
|
256
258
|
{
|
|
257
259
|
"url" => "http://localhost:{port}",
|
|
258
260
|
"description" => "Development server",
|