rspec-rails-api 0.6.3 → 0.7.0

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: 4a96138e6fbb4608ddbf6a4e03912e3e2e262610bc0f98dadf5ad2c26a756ce8
4
- data.tar.gz: 8bfaf96bafa6a8420db600978af05499e398d06ae6db0d18cfdc7cde86c68119
3
+ metadata.gz: 063a556e42014a4511564abe16c657d4957ae13e51a884b9813ba1c168a3ba57
4
+ data.tar.gz: 35917b290d4121f22208ca686f13408cea7889f5c349d39e018a606710efb0f9
5
5
  SHA512:
6
- metadata.gz: '04593f5aed1d220b4293da9571e9e8dfffef8564b49c76a64598c28565094cd14b6dfaf828074de51604cb5e861eaac35a536c9774edf227770f984929481d39'
7
- data.tar.gz: 7857727829cf0e9df507566f31fc01ec6f1da45cbd0181cf8340f6f96245f0f0935eb5dc7f01c8b607335e98a9e0c7f6bedad5a44ec7d19bec8c058256732b83
6
+ metadata.gz: ffb97e91dde2e69050a7b38399511e902a0b9c62807af391269fd66e84379752c2883897639c8c36633ba6f85ffbb00abfa5cc89c050653943ce4cbab2a7cbf4
7
+ data.tar.gz: 92f2182d34c8b83f8201975eb6d0551ec96cf1ca563668a2acd073eec549403c047c3ab73f9d11b6fe974529ce5a9c2cec02eecacecddcbf0cd7831c7ea13cfa
data/CHANGELOG.md CHANGED
@@ -18,6 +18,24 @@ Maintenance, in case of rework, dependencies change
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [0.7.0] - 2024-01-24
22
+
23
+ ### Fixed
24
+
25
+ - [BREAKING] Don't add `name` property in security schemes that should not have one.
26
+ Only `type: :apiKey` should have one, so the `name` argument of `add_security_scheme` has been removed. Specify it
27
+ when it is required/accepted only.
28
+ ```rb
29
+ # Change:
30
+ # ref name schema
31
+ renderer.add_security_scheme :basic, "Basic authentication", { type: "http", scheme: "basic" }
32
+ renderer.add_security_scheme :api_key, "API key authentication", { type: "apiKey", in: "header" }
33
+ # To:
34
+ # ref schema
35
+ renderer.add_security_scheme :basic, type: "http", scheme: "basic"
36
+ renderer.add_security_scheme :api_key, name: "API key authentication", type: "apiKey", in: "header"
37
+ ```
38
+
21
39
  ## [0.6.3] - 2024-01-24
22
40
 
23
41
  ### Fixed
@@ -83,7 +101,7 @@ Maintenance, in case of rework, dependencies change
83
101
  prefix
84
102
 
85
103
  ### Fixed
86
- -
104
+
87
105
  - Fixed an error when an object is defined with an attribute named `type`.
88
106
 
89
107
  ## [0.4.0] - 2021-12-19
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-rails-api (0.6.3)
4
+ rspec-rails-api (0.7.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -38,12 +38,10 @@ module RSpec
38
38
  # Adds a security scheme definition to the API documentation
39
39
  #
40
40
  # @param reference [Symbol] Reference to use in the tests
41
- # @param name [String] Human friendly name
42
41
  # @param definition [Hash] Security scheme definition as per https://swagger.io/specification/#security-scheme-object
43
- def add_security_scheme(reference, name, definition)
42
+ def add_security_scheme(reference, definition)
44
43
  raise "Security scheme #{reference} is already defined" if @api_security.key? reference
45
44
 
46
- definition[:name] = name unless reference == :basic
47
45
  @api_security[reference] = definition
48
46
  end
49
47
 
@@ -3,7 +3,7 @@
3
3
  module RSpec
4
4
  module Rails
5
5
  module Api
6
- VERSION = '0.6.3'
6
+ VERSION = '0.7.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-rails-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Tancoigne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport