api_validator 0.1.2 → 0.1.3

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: eb08a7dc94d65c72fc5a97a70fc72508b441642fb92d156cb7c0360cac6dcb6c
4
- data.tar.gz: 63b76ba48e8b2630ede2cd461cb624a9699c378b60fbb0abd2d9c581ff52434a
3
+ metadata.gz: 43abcdf0795c1930706ba075cd788eb51ddfe082a591de48cafd22a0d963c052
4
+ data.tar.gz: c7b6ea0833a200f94b85fbcc099024ca249027e59567678d7ae6913483017f21
5
5
  SHA512:
6
- metadata.gz: c41ddb3e977290e011cd01616330a8272169c1cb004eff77ff82f934e72c18c377655d0f4cbb1b3c5eecd96801ba7baa2757e5973a16d6f29119c8d507f9515e
7
- data.tar.gz: a15f93d098661c191b568bcd1eb9db42354011642a4db4b75823ca7389837c44691d1e981e200865cc5dcf453b6a4dcd6db40903f014c31b48fa4abbc69fb184
6
+ metadata.gz: f6bf7d13a94c8571d4564a60c2c6a9d2e7574163614a485eac3faadcb4e8f9e450e47c3af079f714517a7968dd0cd5b03e8d6f1eade44f87e4c40de02750333f
7
+ data.tar.gz: 2c2c55aa241a40b88a1cdb74145e499b2e9c1dc2392574cecf57c45b0df7a303b5635458b4dc82342a5bb83078a543d9b291bb0efbdf92ad8f886022a923f875
@@ -17,7 +17,7 @@ module ApiValidator
17
17
  # when param's value is JSON string then parse it and validate parameters
18
18
  if (rule == "json_string" and defination == true)
19
19
  begin
20
- json_data = JSON.parse(params[key])
20
+ json_data = JSON.parse(params[key]) rescue params[key]
21
21
  json_data = [json_data] unless json_data.class == Array
22
22
  json_data.each do |data|
23
23
  data.keys.each do |json_data_key|
@@ -109,4 +109,4 @@ module ApiValidator
109
109
  end
110
110
  end
111
111
  # Require our engine
112
- require "api_validator/engine"
112
+ require "api_validator/engine"
@@ -1,3 +1,3 @@
1
1
  module ApiValidator
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sandipkaranjekar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-25 00:00:00.000000000 Z
11
+ date: 2020-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler