rspec_api_documentation-open_api 0.2.6 → 0.2.7
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: 4dcf1702539bee864518b07dfc2d4a866ba97ec9dd00867e78f9a75b2f7d9db3
|
4
|
+
data.tar.gz: a3091c28a0c90979cc7c11ea108d385f224741dc7193e2e4494857b0f9d4c0d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98c706b8d9287c51097b1a26af2c20536d3f95cb02ebe314bf25799095e747388727c671757dba19b5c93d7a74dce5a7c67903717e55f3c85bb1f4aa779cb798
|
7
|
+
data.tar.gz: 4f1cd0d20abae4af4c172ed56ff9547fb8503415dbb0b1422e8473ca749232f461ee95b496402352bc7f7aee6361a0e3f28b7e48500a759f19f792e708c92fd5
|
@@ -248,32 +248,43 @@ module RspecApiDocumentation
|
|
248
248
|
end
|
249
249
|
|
250
250
|
def info
|
251
|
-
|
252
|
-
RspecApiDocumentation.configuration.open_api["info"] ||
|
253
|
-
{
|
254
|
-
"version" => "1.0.0",
|
255
|
-
"title" => "Open API",
|
256
|
-
"description" => "Open API",
|
257
|
-
"contact" => {
|
258
|
-
"name" => "OpenAPI"
|
259
|
-
}
|
260
|
-
}).deep_stringify_keys
|
251
|
+
configs["info"]
|
261
252
|
end
|
262
253
|
|
263
254
|
def servers
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
255
|
+
configs["servers"]
|
256
|
+
end
|
257
|
+
|
258
|
+
def configs
|
259
|
+
(defined_configs || default_configs).deep_stringify_keys
|
260
|
+
end
|
261
|
+
|
262
|
+
def defined_configs
|
263
|
+
RspecApiDocumentation.configuration.open_api
|
264
|
+
end
|
265
|
+
|
266
|
+
def default_configs
|
267
|
+
{
|
268
|
+
info: {
|
269
|
+
"version" => "1.0.0",
|
270
|
+
"title" => "Open API",
|
271
|
+
"description" => "Open API",
|
272
|
+
"contact" => {
|
273
|
+
"name" => "OpenAPI"
|
274
|
+
}
|
275
|
+
},
|
276
|
+
servers: [
|
277
|
+
{
|
278
|
+
"url" => "http://localhost:{port}",
|
279
|
+
"description" => "Development server",
|
280
|
+
"variables" => {
|
281
|
+
"port" => {
|
282
|
+
"default" => "3000"
|
283
|
+
}
|
273
284
|
}
|
274
285
|
}
|
275
|
-
|
276
|
-
|
286
|
+
]
|
287
|
+
}
|
277
288
|
end
|
278
289
|
end
|
279
290
|
end
|