rswag-specs 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rswag/specs/request_factory.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 245c439ceac69ca5425c07f53157d0a411406ef1
|
4
|
+
data.tar.gz: e6e6e30d5f3b1c2e3df4e5be0a15ff8e70dbc188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: debedee79e61ec31e9b9109b44e5653f033b172e977b5c9948ac3fdac44fbb4f74855fabbad1d23cfedccdb8bf70bb1a2393908644d49712513ff186c865e661
|
7
|
+
data.tar.gz: 83ba932ac13fe7f98f51c01fbd4b4fbfbbaa31bc4550724059fae76f0af52847a9502a29530ff5855a18f482cfc67d40862305868276f5e5b687f7655247324c
|
@@ -38,13 +38,13 @@ module Rswag
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def derive_security_params(metadata, swagger_doc)
|
41
|
-
requirements = metadata[:operation][:security] || swagger_doc[:security]
|
42
|
-
scheme_names = requirements
|
43
|
-
|
41
|
+
requirements = metadata[:operation][:security] || swagger_doc[:security] || []
|
42
|
+
scheme_names = requirements.flat_map { |r| r.keys }
|
43
|
+
schemes = (swagger_doc[:securityDefinitions] || {}).slice(*scheme_names).values
|
44
44
|
|
45
|
-
|
45
|
+
schemes.map do |scheme|
|
46
46
|
param = (scheme[:type] == :apiKey) ? scheme.slice(:name, :in) : { name: 'Authorization', in: :header }
|
47
|
-
param.merge(type: :string)
|
47
|
+
param.merge(type: :string, required: requirements.one?)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rswag-specs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richie Morris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.6.
|
110
|
+
rubygems_version: 2.6.11
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: A Swagger-based DSL for rspec-rails & accompanying rake task for generating
|