rspec-openapi 0.12.0 → 0.13.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 +4 -0
- data/lib/rspec/openapi/minitest_hooks.rb +1 -1
- data/lib/rspec/openapi/record_builder.rb +1 -1
- data/lib/rspec/openapi/schema_merger.rb +2 -1
- data/lib/rspec/openapi/version.rb +1 -1
- data/rspec-openapi.gemspec +6 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5139294ebac456aadd2c09832f55cb214b7bf4ba9893919445823455cbee18a
|
4
|
+
data.tar.gz: b77813ff2d18290e714482bfa45350f69b182a638162d083923acb9b21124cfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58de63dbf9608beb5f313eb57e6e1e4386eefa23fd1b572d17b06319f571ca3c6b1ac172a7886b3dcd42e14feb1f5f60ebd5a532951441193f8400d66e5229ce
|
7
|
+
data.tar.gz: 95765054acd231993f058a9f3a31a596c56ff143af9f1dc576bfb2f201773e611025329069b8c49751f50d3bf14b16a4f83ef863587d2f7815209f0afcdccb4a
|
data/CHANGELOG.md
CHANGED
@@ -10,7 +10,7 @@ module RSpec::OpenAPI::Minitest
|
|
10
10
|
result = super
|
11
11
|
if ENV['OPENAPI'] && self.class.openapi?
|
12
12
|
file_path = method(name).source_location.first
|
13
|
-
human_name = name.sub(/^test_/, '').gsub(
|
13
|
+
human_name = name.sub(/^test_/, '').gsub('_', ' ')
|
14
14
|
example = Example.new(self, human_name, {}, file_path)
|
15
15
|
path = RSpec::OpenAPI.path.yield_self { |p| p.is_a?(Proc) ? p.call(example) : p }
|
16
16
|
record = RSpec::OpenAPI::RecordBuilder.build(self, example: example)
|
@@ -48,7 +48,7 @@ class << RSpec::OpenAPI::RecordBuilder = Object.new
|
|
48
48
|
|
49
49
|
def extract_headers(request, response)
|
50
50
|
request_headers = RSpec::OpenAPI.request_headers.each_with_object([]) do |header, headers_arr|
|
51
|
-
header_key = header.gsub(
|
51
|
+
header_key = header.gsub('-', '_').upcase
|
52
52
|
header_value = request.get_header(['HTTP', header_key].join('_')) || request.get_header(header_key)
|
53
53
|
headers_arr << [header, header_value] if header_value
|
54
54
|
end
|
@@ -42,7 +42,8 @@ class << RSpec::OpenAPI::SchemaMerger = Object.new
|
|
42
42
|
# parameters need to be merged as if `name` and `in` were the Hash keys.
|
43
43
|
merge_arrays(base, key, value)
|
44
44
|
else
|
45
|
-
|
45
|
+
# do not ADD `properties` or `required` fields if `additionalProperties` field is present
|
46
|
+
base[key] = value unless base.key?('additionalProperties') && %w[properties required].include?(key)
|
46
47
|
end
|
47
48
|
end
|
48
49
|
base
|
data/rspec-openapi.gemspec
CHANGED
@@ -14,9 +14,12 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = 'MIT'
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
|
16
16
|
|
17
|
-
spec.metadata
|
18
|
-
|
19
|
-
|
17
|
+
spec.metadata = {
|
18
|
+
'homepage_uri' => 'https://github.com/exoego/rspec-openapi',
|
19
|
+
'source_code_uri' => 'https://github.com/exoego/rspec-openapi',
|
20
|
+
'changelog_uri' => "https://github.com/exoego/rspec-openapi/releases/tag/v#{RSpec::OpenAPI::VERSION}",
|
21
|
+
'rubygems_mfa_required' => 'true',
|
22
|
+
}
|
20
23
|
|
21
24
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
25
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-openapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-02
|
12
|
+
date: 2024-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -88,7 +88,7 @@ licenses:
|
|
88
88
|
metadata:
|
89
89
|
homepage_uri: https://github.com/exoego/rspec-openapi
|
90
90
|
source_code_uri: https://github.com/exoego/rspec-openapi
|
91
|
-
changelog_uri: https://github.com/exoego/rspec-openapi/
|
91
|
+
changelog_uri: https://github.com/exoego/rspec-openapi/releases/tag/v0.13.0
|
92
92
|
rubygems_mfa_required: 'true'
|
93
93
|
post_install_message:
|
94
94
|
rdoc_options: []
|