open_api_import 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/open_api_import.rb +2 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5373bd60189cd24d98a4a6678c10e620c82329032b4d3fdf94612eb8fe9a2de
4
- data.tar.gz: d632911fcb02ac638d49ec8437d3187516595c1d5c20eee25a69cb7d09a5941a
3
+ metadata.gz: be43af7a48be360d8e34e10981e693aa64979a640d13d74460e094e8ebf0192a
4
+ data.tar.gz: f97a73817ffabce7600225168dd4b8400faf0574d39839ed4d544e08df8c63d7
5
5
  SHA512:
6
- metadata.gz: 1a1985fc74521df9ba93984c50c29be5bbc9455f06065f8ce37a88d3c35227ab0decd43a498a8942493b6f5c31ee907b80960044e082db4edc86bb87535f1909
7
- data.tar.gz: edec1ec5196a831695e253625bee877072ba31aaa892d8489006bb7f739b515651fe9677d2dcac033bcf996f1a2a3ffd90b9df6dc99125d48e76772fd9d95b82
6
+ metadata.gz: 33ec46806b315806f8b3232948bdb781aed0079e0988d9f10c6373655f9ba28865ecdc00acd2ea5ffb2cb0d77d8c2611564e2340817a609c3ba2b2fc17370e19
7
+ data.tar.gz: 8dbd0cc147f70b600df05577ad2b2c53c59b43a63fed10cd6f61ce522fcfed58e543eec693ba877c5b7b3408371c42ab873fc7b817179979867ba80205364c1e
@@ -295,7 +295,7 @@ class OpenApiImport
295
295
  if body.keys.include?(:properties) and body[:properties].size > 0
296
296
  body[:properties].each { |dpk, dpv|
297
297
  if dpv.keys.include?(:example)
298
- valv = dpv[:example]
298
+ valv = dpv[:example].to_s
299
299
  else
300
300
  if dpv.type == "object"
301
301
  valv = "{}"
@@ -543,7 +543,7 @@ class OpenApiImport
543
543
  val[:type]='object'
544
544
  end
545
545
  if val.key?(:example)
546
- example << if val[:example].is_a?(String)
546
+ example << if val[:example].is_a?(String) or val[:example].is_a?(Time)
547
547
  " #{prop.to_sym}: \"#{val[:example]}\", "
548
548
  else
549
549
  " #{prop.to_sym}: #{val[:example]}, "
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_api_import
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-15 00:00:00.000000000 Z
11
+ date: 2019-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oas_parser