openapi_first 0.6.3 → 0.6.4

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: 9c39942d9c5860a92b211d51852ad5633dd573f2a244d85631d2c2c4990e607c
4
- data.tar.gz: 8bbfd7a2cdf632338117d689dd770561d5f4a903223800c9a6829e556ab1c26a
3
+ metadata.gz: 587fc0801a17d65a320a6eb56afbcbda34a3861b7098435a6f1f3bdbd83bee65
4
+ data.tar.gz: 78d32f17e40e2a489729989c6008e079d29942ca9a440bf90d5463fc4b0829a7
5
5
  SHA512:
6
- metadata.gz: 58ab052d0d464da3f37224c943a9da8c990eb6f75b13306b223d1a6d4e36f55588df3e5f2106ca2659a44a048604cd011da50d6b11417efb8b45f05762ab23e4
7
- data.tar.gz: 53ba1d5a794cd1561e812c37cc426e6d282bbfd6c7bb5cce547be7eda1d90c342d4b6cdfc490e1b0765b43ba7fba126abea8ae413c0744c444c2c2aae725b2aa
6
+ metadata.gz: 45cc9e17bb4876e263ef37bc9f7b0023289da1638b989777dbff09ba1ef88f8521541a4a4a29a81c0e6b7ee46ba4f247a9bdff92d0ca86f767995af37462cffa
7
+ data.tar.gz: 397633c21c2c24a86193ee25e7732fe839d74b318a0e76094aad787eb37e9232a4c4495f73a1b006ca42d95d3ddc76eca74b5a9623af9d533070c4b7a08e7f90
@@ -3,6 +3,10 @@
3
3
  ## Unreleased
4
4
 
5
5
 
6
+ ## 0.6.4
7
+
8
+ - Fix: Rewind request body after reading
9
+
6
10
  ## 0.6.3
7
11
 
8
12
  - Add option to parse only certain paths from OAS file
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openapi_first (0.6.3)
4
+ openapi_first (0.6.4)
5
5
  json_schemer (~> 0.2)
6
6
  multi_json (~> 1.13)
7
7
  oas_parser (~> 0.19)
@@ -19,8 +19,9 @@ module OpenapiFirst
19
19
  return @app.call(env) unless operation&.request_body
20
20
 
21
21
  req = Rack::Request.new(env)
22
+ body = req.body.read
23
+ req.body.rewind
22
24
  content_type = req.content_type
23
- body = req.body
24
25
  catch(:halt) do
25
26
  validate_request_content_type!(content_type, operation)
26
27
  validate_request_body_presence!(env, body, operation)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenapiFirst
4
- VERSION = '0.6.3'
4
+ VERSION = '0.6.4'
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.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Haller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-17 00:00:00.000000000 Z
11
+ date: 2019-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json_schemer