rspec_api_documentation-open_api 0.2.3 → 0.2.4
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: c989016991f93185bfb385f7dd5a7bd01b8d1d4988ac504f16df453fed91c03e
|
4
|
+
data.tar.gz: d5889a9a8344dc975ec3c4264341105ad4e5be34b7fe8cecb940195a9087d6db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87ec08457287c998e5306f2a7fa5a351b11d5da60f72dcd2ab0c30db2f6f7dcdcd60bf60fd383cc9f3285c6e1bd4b44a13dcde111b6f4354abb9ede493b74a2a
|
7
|
+
data.tar.gz: 7d947095a8b5064972569822ea416b17159f484520ce6696b16765bc9983654628dda33d294dd01fb52ed6a93f194b7664b783e58fc00335871681bc6d8288ca
|
@@ -79,16 +79,18 @@ module RspecApiDocumentation
|
|
79
79
|
req["request_headers"]&.each do |name, value|
|
80
80
|
if name == "Authorization"
|
81
81
|
swagger["paths"][route][method]["security"] = if /Bearer (.*)/.match?(value)
|
82
|
-
responses[
|
83
|
-
|
84
|
-
|
85
|
-
"
|
86
|
-
"
|
87
|
-
"
|
82
|
+
if !responses[401]
|
83
|
+
responses[401] = {
|
84
|
+
"description" => "Unauthorized Access",
|
85
|
+
"content" => {
|
86
|
+
"application/json" => {
|
87
|
+
"schema" => {
|
88
|
+
"$ref" => "#/components/schemas/unauthorized"
|
89
|
+
}
|
88
90
|
}
|
89
91
|
}
|
90
92
|
}
|
91
|
-
|
93
|
+
end
|
92
94
|
[{ "bearerAuth" => [] }]
|
93
95
|
else
|
94
96
|
[{ "basicAuth" => [] }]
|
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.4
|
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-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec_api_documentation
|