openapi_first 0.15.0 → 0.16.0.beta1
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/Gemfile.lock +1 -1
- data/benchmarks/Gemfile.lock +1 -1
- data/lib/openapi_first/request_validation.rb +2 -2
- data/lib/openapi_first/router.rb +5 -7
- data/lib/openapi_first/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f46ad8751619914fa7b387ecb8a0178e67a7ba070e863321463f7ae1097e250
|
4
|
+
data.tar.gz: 5961b6bff590f957a8908d62b3c87bd65438dbdfe055020c61739af2862b06cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e08b5d1b12f3379ef2f28ab98da925a43c7adc69ea617c305dedb06fbe63e7843cf0d861cd32d7942f7770b4f7ac9bb2762ffb179374fd15deff2b86f64899f
|
7
|
+
data.tar.gz: ac406a2a868a44b8cfb8d54a71b5c4fb1d1078f666c6f3ee683a191c83c090a8312f59bd399e089edb4062d309ca98df02ee8b2078a445c1e3b16e5e19cfd462
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/benchmarks/Gemfile.lock
CHANGED
@@ -10,9 +10,9 @@ module OpenapiFirst
|
|
10
10
|
class RequestValidation # rubocop:disable Metrics/ClassLength
|
11
11
|
prepend RouterRequired
|
12
12
|
|
13
|
-
def initialize(app,
|
13
|
+
def initialize(app, options = {})
|
14
14
|
@app = app
|
15
|
-
@raise = raise_error
|
15
|
+
@raise = options.fetch(:raise_error, false)
|
16
16
|
end
|
17
17
|
|
18
18
|
def call(env) # rubocop:disable Metrics/AbcSize
|
data/lib/openapi_first/router.rb
CHANGED
@@ -7,15 +7,13 @@ module OpenapiFirst
|
|
7
7
|
class Router
|
8
8
|
def initialize(
|
9
9
|
app,
|
10
|
-
|
11
|
-
raise_error: false,
|
12
|
-
not_found: :halt,
|
13
|
-
parent_app: nil
|
10
|
+
options
|
14
11
|
)
|
15
12
|
@app = app
|
16
|
-
@parent_app = parent_app
|
17
|
-
@raise = raise_error
|
18
|
-
@not_found = not_found
|
13
|
+
@parent_app = options.fetch(:parent_app, nil)
|
14
|
+
@raise = options.fetch(:raise_error, false)
|
15
|
+
@not_found = options.fetch(:not_found, :halt)
|
16
|
+
spec = options.fetch(:spec)
|
19
17
|
@filepath = spec.filepath
|
20
18
|
@router = build_router(spec.operations)
|
21
19
|
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.
|
4
|
+
version: 0.16.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Haller
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deep_merge
|
@@ -239,9 +239,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
239
239
|
version: 2.6.0
|
240
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
241
241
|
requirements:
|
242
|
-
- - "
|
242
|
+
- - ">"
|
243
243
|
- !ruby/object:Gem::Version
|
244
|
-
version:
|
244
|
+
version: 1.3.1
|
245
245
|
requirements: []
|
246
246
|
rubygems_version: 3.3.3
|
247
247
|
signing_key:
|