openapi_first 0.14.0 → 0.14.1

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: 4f1e3ae677c078e5e4b64641c76c40a66994edb8599d9001e3673458eb83338d
4
- data.tar.gz: 6e394c9017964515be4e8970899fe697480600753ca6e81db78d34faed7c982b
3
+ metadata.gz: a3791f0c4bae9c39517b960e99ea3581740eaca9ad10b6189242d7690defd621
4
+ data.tar.gz: bfb77aabdba80a0406ff8909e6fcf98ef7c850465fbf562bb6dd8574bd0dd1e2
5
5
  SHA512:
6
- metadata.gz: e41290229c5e5bc7d65179783b6b1ec0403ab987433c5b65535c10d3fee00a42440626f26f2a8ffd02d69a63b64684780165cc4398baf873842e20731570a076
7
- data.tar.gz: b93594502a2dff93be5b0bff277f49431c40cae4a77a263acfac14370c855dbd424ac36156b832ec2f2ef1f892e44c0c7aaf84d6b567d772220da0ec991357a5
6
+ metadata.gz: b40805c6536ad7bfe932f8d42bea8580493099afdbd12667f3d646c27d2ac8cd9efe4a3dfd2a44e1460322215bfc184d4cbcf69a8b45f3b84efbcc0bfc6c2ad5
7
+ data.tar.gz: ed34c78c3b0960aa670876af49124d08175ceb163b503939c0668d4d6104b20931ca823db606503cfe9a95047cf9303a2bee597f5e97ccc3d9625dc1df02c349
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+
4
+ ## 0.14.1
5
+ - Bugfix: Don't mix path- and operation-level parameters for request validation
6
+
3
7
  ## 0.14.0
4
8
  - Handle custom x-handler field in the API description to find a handler method not based on operationId
5
9
  - Add `resolver` option to provide a custom resolver to find a handler method
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openapi_first (0.14.0)
4
+ openapi_first (0.14.1)
5
5
  deep_merge (>= 1.2.1)
6
6
  hanami-router (~> 2.0.alpha3)
7
7
  hanami-utils (~> 2.0.alpha1)
@@ -13,7 +13,7 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activesupport (6.1.4)
16
+ activesupport (6.1.4.1)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
@@ -56,7 +56,7 @@ GEM
56
56
  mustermann-contrib (1.1.1)
57
57
  hansi (~> 0.2.0)
58
58
  mustermann (= 1.1.1)
59
- nokogiri (1.12.2)
59
+ nokogiri (1.12.5)
60
60
  mini_portile2 (~> 2.6.1)
61
61
  racc (~> 1.4)
62
62
  oas_parser (0.25.4)
@@ -67,7 +67,7 @@ GEM
67
67
  hash-deep-merge
68
68
  mustermann-contrib (~> 1.1.1)
69
69
  nokogiri
70
- parallel (1.20.1)
70
+ parallel (1.21.0)
71
71
  parser (3.0.2.0)
72
72
  ast (~> 2.4.1)
73
73
  pry (0.14.1)
@@ -95,22 +95,22 @@ GEM
95
95
  diff-lcs (>= 1.2.0, < 2.0)
96
96
  rspec-support (~> 3.10.0)
97
97
  rspec-support (3.10.2)
98
- rubocop (1.18.4)
98
+ rubocop (1.22.1)
99
99
  parallel (~> 1.10)
100
100
  parser (>= 3.0.0.0)
101
101
  rainbow (>= 2.2.2, < 4.0)
102
102
  regexp_parser (>= 1.8, < 3.0)
103
103
  rexml
104
- rubocop-ast (>= 1.8.0, < 2.0)
104
+ rubocop-ast (>= 1.12.0, < 2.0)
105
105
  ruby-progressbar (~> 1.7)
106
106
  unicode-display_width (>= 1.4.0, < 3.0)
107
- rubocop-ast (1.9.0)
107
+ rubocop-ast (1.12.0)
108
108
  parser (>= 3.0.1.1)
109
109
  ruby-progressbar (1.11.0)
110
110
  ruby2_keywords (0.0.5)
111
111
  tzinfo (2.0.4)
112
112
  concurrent-ruby (~> 1.0)
113
- unicode-display_width (2.0.0)
113
+ unicode-display_width (2.1.0)
114
114
  uri_template (0.7.0)
115
115
  zeitwerk (2.4.2)
116
116
 
@@ -127,4 +127,4 @@ DEPENDENCIES
127
127
  rubocop
128
128
 
129
129
  BUNDLED WITH
130
- 2.2.3
130
+ 2.2.28
data/README.md CHANGED
@@ -117,7 +117,7 @@ run OpenapiFirst::Responder, spec: OpenapiFirst.load('./openapi/openapi.yaml')
117
117
  | Name | Description
118
118
  |:---|---|
119
119
  | `namespace:` | Optional. A class or module where to find the handler method. |
120
- | `resolver:` | Optional. An object that responds to `#call(operation)` and returns a (handler)[#handler]. By default this is an instance of [DefaultOperationResolver](#OpenapiFirst::DefaultOperationResolver) |
120
+ | `resolver:` | Optional. An object that responds to `#call(operation)` and returns a [handler](#handlers). By default this is an instance of [DefaultOperationResolver](#OpenapiFirst::DefaultOperationResolver) |
121
121
 
122
122
 
123
123
  ### OpenapiFirst::DefaultOperationResolver
@@ -188,7 +188,7 @@ The above will use the mentioned Rack middlewares to:
188
188
  | `response_validation:` | `true`, `false` | If set to true it raises an exception if the response is invalid. This is useful during testing. | `false`
189
189
  | `router_raise_error:` | `true`, `false` | If set to true it raises an exception (subclass of `OpenapiFirst::Error` when a request path/method is not specified. This is useful during testing. | `false`
190
190
  | `request_validation_raise_error:` | `true`, `false` | If set to true it raises an exception (subclass of `OpenapiFirst::Error` when a request is not valid. | `false`
191
- | `resolver:` | | Option to customize finding the [handler](#handler) method for an operation. See [OpenapiFirst::Responder](#OpenapiFirst::Responder) for details.
191
+ | `resolver:` | | Option to customize finding the [handler](#handlers) method for an operation. See [OpenapiFirst::Responder](#OpenapiFirst::Responder) for details.
192
192
 
193
193
 
194
194
  Handler functions (`find_pet`) are called with two arguments:
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- openapi_first (0.14.0)
4
+ openapi_first (0.14.1)
5
5
  deep_merge (>= 1.2.1)
6
6
  hanami-router (~> 2.0.alpha3)
7
7
  hanami-utils (~> 2.0.alpha1)
@@ -13,7 +13,7 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activesupport (6.1.4)
16
+ activesupport (6.1.4.1)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
@@ -31,12 +31,12 @@ GEM
31
31
  rack (>= 1.5)
32
32
  concurrent-ruby (1.1.9)
33
33
  deep_merge (1.2.1)
34
- dry-configurable (0.12.1)
34
+ dry-configurable (0.13.0)
35
35
  concurrent-ruby (~> 1.0)
36
- dry-core (~> 0.5, >= 0.5.0)
37
- dry-container (0.8.0)
36
+ dry-core (~> 0.6)
37
+ dry-container (0.9.0)
38
38
  concurrent-ruby (~> 1.0)
39
- dry-configurable (~> 0.1, >= 0.1.3)
39
+ dry-configurable (~> 0.13, >= 0.13.0)
40
40
  dry-core (0.7.1)
41
41
  concurrent-ruby (~> 1.0)
42
42
  dry-inflector (0.2.1)
@@ -52,7 +52,7 @@ GEM
52
52
  dry-logic (~> 1.0, >= 1.0.2)
53
53
  ecma-re-validator (0.3.0)
54
54
  regexp_parser (~> 2.0)
55
- grape (1.5.3)
55
+ grape (1.6.0)
56
56
  activesupport
57
57
  builder
58
58
  dry-types (>= 1.1)
@@ -90,7 +90,7 @@ GEM
90
90
  mustermann (= 1.1.1)
91
91
  mustermann-grape (1.0.1)
92
92
  mustermann (>= 1.0.0)
93
- nokogiri (1.12.2)
93
+ nokogiri (1.12.5)
94
94
  mini_portile2 (~> 2.6.1)
95
95
  racc (~> 1.4)
96
96
  oas_parser (0.25.4)
@@ -101,7 +101,7 @@ GEM
101
101
  hash-deep-merge
102
102
  mustermann-contrib (~> 1.1.1)
103
103
  nokogiri
104
- openapi_parser (0.14.1)
104
+ openapi_parser (0.15.0)
105
105
  public_suffix (4.0.6)
106
106
  racc (1.5.2)
107
107
  rack (2.2.3)
@@ -118,7 +118,7 @@ module OpenapiFirst
118
118
  end
119
119
 
120
120
  def all_parameters
121
- parameters = @path_item_object['parameters'] || []
121
+ parameters = @path_item_object['parameters']&.dup || []
122
122
  parameters_on_operation = operation_object['parameters']
123
123
  parameters.concat(parameters_on_operation) if parameters_on_operation
124
124
  parameters
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenapiFirst
4
- VERSION = '0.14.0'
4
+ VERSION = '0.14.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openapi_first
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Haller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-08 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -176,7 +176,6 @@ files:
176
176
  - ".gitignore"
177
177
  - ".rspec"
178
178
  - ".rubocop.yml"
179
- - ".travis.yml"
180
179
  - CHANGELOG.md
181
180
  - Gemfile
182
181
  - Gemfile.lock
@@ -242,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
241
  - !ruby/object:Gem::Version
243
242
  version: '0'
244
243
  requirements: []
245
- rubygems_version: 3.2.3
244
+ rubygems_version: 3.2.22
246
245
  signing_key:
247
246
  specification_version: 4
248
247
  summary: Implement REST APIs based on OpenApi.
data/.travis.yml DELETED
@@ -1,8 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.7.0
7
- before_install: gem install bundler -v 2.1.4
8
- install: bundle install --jobs=3 --retry=3