openapi_first 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/openapi_first/middlewares/response_validation.rb +0 -11
- data/lib/openapi_first/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a500abac816ab74de8b74c3d72793f31865d8c0c4863b7af769d748b99a85790
|
4
|
+
data.tar.gz: cf0394ab100eea73f66ff5275ff81bc1fb7cb06d63ed69f62cb961db48966f61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb03e7141b82b6ae39d59948e5a3ce90a67c8ec2744b257ca18ed95cf537796200923e4bbc1bccfca5a2359995405f5015df29a01947e0add2ec653dfa44b778
|
7
|
+
data.tar.gz: 16458594f9cfef02f7faa3bd207487d74c8eaf400704c1631d80edca3ab1ae6d5820213c8efb85145be3f1dc3a1f91020cfb5b7c9330bd52c6acfca601fc7eb5
|
data/CHANGELOG.md
CHANGED
@@ -2,8 +2,14 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## 2.0.4
|
6
|
+
|
7
|
+
- Fix issue with parsing reponse body when using Rails https://github.com/ahx/openapi_first/issues/281
|
8
|
+
|
5
9
|
## 2.0.3
|
6
10
|
|
11
|
+
- Fix `OpenapiFirst::Test.register` https://github.com/ahx/openapi_first/issues/276
|
12
|
+
|
7
13
|
- Request validation middleware now accepts `error_response: false` do disable rendering a response. This is useful if you just want to collect metrics (via hooks) during a migration phase.
|
8
14
|
|
9
15
|
## 2.0.2
|
@@ -25,20 +25,9 @@ module OpenapiFirst
|
|
25
25
|
|
26
26
|
def call(env)
|
27
27
|
status, headers, body = @app.call(env)
|
28
|
-
body = read_body(body)
|
29
28
|
@definition.validate_response(Rack::Request.new(env), Rack::Response[status, headers, body], raise_error: @raise)
|
30
29
|
[status, headers, body]
|
31
30
|
end
|
32
|
-
|
33
|
-
private
|
34
|
-
|
35
|
-
def read_body(body)
|
36
|
-
return body.to_ary if body.respond_to?(:to_ary)
|
37
|
-
|
38
|
-
result = []
|
39
|
-
body.each { |part| result << part }
|
40
|
-
result
|
41
|
-
end
|
42
31
|
end
|
43
32
|
end
|
44
33
|
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: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Haller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hana
|