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 +4 -4
- data/CHANGELOG.md +19 -1
- data/Gemfile.lock +1 -1
- data/lib/rspec/rails/api/open_api_renderer.rb +1 -3
- data/lib/rspec/rails/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 063a556e42014a4511564abe16c657d4957ae13e51a884b9813ba1c168a3ba57
|
4
|
+
data.tar.gz: 35917b290d4121f22208ca686f13408cea7889f5c349d39e018a606710efb0f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
@@ -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,
|
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
|
|
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.
|
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-
|
11
|
+
date: 2024-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|