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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b221d36e6ff92306e1bd720b4bb07e114839c8e047ad530f6ac4cb2a11eb4ae5
4
- data.tar.gz: 5f5daf56dddc8a7b9477f961611d3bd4550eb498aa38d166035e5b18fe7027bd
3
+ metadata.gz: a5139294ebac456aadd2c09832f55cb214b7bf4ba9893919445823455cbee18a
4
+ data.tar.gz: b77813ff2d18290e714482bfa45350f69b182a638162d083923acb9b21124cfe
5
5
  SHA512:
6
- metadata.gz: 18410768ff613a19b39f910e20e58ecda87337095b354e718bdb5f6b6e2713429acd26a289fd4ffa89a493348aa226561d89340d9685d37caa30b44c54d17be8
7
- data.tar.gz: 5542bf85a5f1d46eacbdc0936b57ae197279bf618fa1628082e7d33c5600a2583f450426999dbc6eea4d4a401ffb307ea5d207b551aa27d586eb4682e572c9fb
6
+ metadata.gz: 58de63dbf9608beb5f313eb57e6e1e4386eefa23fd1b572d17b06319f571ca3c6b1ac172a7886b3dcd42e14feb1f5f60ebd5a532951441193f8400d66e5229ce
7
+ data.tar.gz: 95765054acd231993f058a9f3a31a596c56ff143af9f1dc576bfb2f201773e611025329069b8c49751f50d3bf14b16a4f83ef863587d2f7815209f0afcdccb4a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # THIS CHANGELOG IS DEPRECATED!!
2
+
3
+ Refer https://github.com/exoego/rspec-openapi/releases instead.
4
+
1
5
  ## v0.12.0
2
6
 
3
7
  - feat: Initial support of complex schema with manually-added `oneOf`
@@ -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(/-/, '_').upcase
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
- base[key] = value
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module OpenAPI
5
- VERSION = '0.12.0'
5
+ VERSION = '0.13.0'
6
6
  end
7
7
  end
@@ -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['homepage_uri'] = spec.homepage
18
- spec.metadata['source_code_uri'] = spec.homepage
19
- spec.metadata['changelog_uri'] = File.join(spec.homepage, 'blob/master/CHANGELOG.md')
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.12.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-17 00:00:00.000000000 Z
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/blob/master/CHANGELOG.md
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: []