rspec_api_documentation-open_api 0.2.3 → 0.2.4

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: 1dde492d63d90024fe9422a60071ef652d73edc41f25f1d1e853d9a0be6b779d
4
- data.tar.gz: 18302d402309fdfbc801674956396382d3361db4e9ad1b72f3a070238fdc5689
3
+ metadata.gz: c989016991f93185bfb385f7dd5a7bd01b8d1d4988ac504f16df453fed91c03e
4
+ data.tar.gz: d5889a9a8344dc975ec3c4264341105ad4e5be34b7fe8cecb940195a9087d6db
5
5
  SHA512:
6
- metadata.gz: 3703c3af28fc4f6d654d1cd7162593c83a41918a9b4964e7349237776a2cdf44d9455af875dd54debdcb082abf41a8fe0a783fba6ee4b178704c1a59d92dc2fd
7
- data.tar.gz: 22f5038f469058ac6fb6d542c1a9fb3cabfd6319dc13c464c54effed6150350b85a1fe42b86254d8e9aef6b13600afb0276b91562cdeadbc45236b7c11c57386
6
+ metadata.gz: 87ec08457287c998e5306f2a7fa5a351b11d5da60f72dcd2ab0c30db2f6f7dcdcd60bf60fd383cc9f3285c6e1bd4b44a13dcde111b6f4354abb9ede493b74a2a
7
+ data.tar.gz: 7d947095a8b5064972569822ea416b17159f484520ce6696b16765bc9983654628dda33d294dd01fb52ed6a93f194b7664b783e58fc00335871681bc6d8288ca
@@ -1,5 +1,5 @@
1
1
  module RspecApiDocumentation
2
2
  module OpenApi
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
@@ -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["401"] = {
83
- "description" => "Unauthorized Access",
84
- "content" => {
85
- "application/json" => {
86
- "schema" => {
87
- "$ref" => "#/components/schemas/unauthorized"
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
- } if !responses["401"]
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.3
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-07 00:00:00.000000000 Z
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