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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +9 -9
- data/README.md +2 -2
- data/benchmarks/Gemfile.lock +9 -9
- data/lib/openapi_first/operation.rb +1 -1
- data/lib/openapi_first/version.rb +1 -1
- metadata +3 -4
- data/.travis.yml +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3791f0c4bae9c39517b960e99ea3581740eaca9ad10b6189242d7690defd621
|
|
4
|
+
data.tar.gz: bfb77aabdba80a0406ff8909e6fcf98ef7c850465fbf562bb6dd8574bd0dd1e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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](#
|
|
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:
|
data/benchmarks/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
openapi_first (0.14.
|
|
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.
|
|
34
|
+
dry-configurable (0.13.0)
|
|
35
35
|
concurrent-ruby (~> 1.0)
|
|
36
|
-
dry-core (~> 0.
|
|
37
|
-
dry-container (0.
|
|
36
|
+
dry-core (~> 0.6)
|
|
37
|
+
dry-container (0.9.0)
|
|
38
38
|
concurrent-ruby (~> 1.0)
|
|
39
|
-
dry-configurable (~> 0.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
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.
|
|
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-
|
|
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.
|
|
244
|
+
rubygems_version: 3.2.22
|
|
246
245
|
signing_key:
|
|
247
246
|
specification_version: 4
|
|
248
247
|
summary: Implement REST APIs based on OpenApi.
|