oas_parser 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 252478e9373c278d533cec9ad9a6c01178c7dbc9
4
- data.tar.gz: 6957e4dfb3b2e925868492b9a062ef8da88dfa04
3
+ metadata.gz: 595ef67c6f390240ee6a98aac6bf63c2b954df09
4
+ data.tar.gz: 11d86af03188e0bc04ff6b1f1bbe6dd4aa90243a
5
5
  SHA512:
6
- metadata.gz: 80d26e0ae1704115288fe61c5c6bca669b611f80db4932d6806a7e026b30c8661451cdcbd602327a7ccdfa727f268f0c2032a165a73c56d09f067be6e2919c0b
7
- data.tar.gz: f6fe70ac64151cd910b492ce8e7947e38e1ea7fdced9a803ea9ceae1084d10435cbd9a995e9bfec8b16429db394f2f9c54747875b8e1b3b96eb56fdfe675a6ae
6
+ metadata.gz: 9f0aad769f5924b21a6784cfe9f117a1308da56c3d4b7fdf95c1b818d4c26d15e9af7f040132fb1a9cafd4f0016e07847be271436c071021b170d2df7af7326e
7
+ data.tar.gz: a0eac06844d4d403e16005f088c1d71154cf48a8393537eb85c6aeff2331b29cab2cd93029fbf16c300b2015759e1c7fd875fa316d9a51fcb0ec8aefc1b49b83
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ *.gem
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
@@ -15,6 +15,10 @@ module OasParser
15
15
  raw['type'] || schema['type']
16
16
  end
17
17
 
18
+ def format
19
+ raw['format'] || schema['format']
20
+ end
21
+
18
22
  def array?
19
23
  type == 'array'
20
24
  end
@@ -1,7 +1,7 @@
1
1
  module OasParser
2
2
  class Property
3
3
  include OasParser::RawAccessor
4
- raw_keys :name, :description, :type, :enum, :minimum, :maximum,
4
+ raw_keys :name, :description, :type, :format, :enum, :minimum, :maximum,
5
5
  :example, :default, :items
6
6
 
7
7
  attr_accessor :owner, :name, :schema, :raw
@@ -14,6 +14,7 @@ module OasParser
14
14
  end
15
15
 
16
16
  def required
17
+ return true if raw['required']
17
18
  return false unless schema['required']
18
19
  schema['required'].include? name
19
20
  end
@@ -1,3 +1,3 @@
1
1
  module OasParser
2
- VERSION = "0.1.2"
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oas_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Butler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-04 00:00:00.000000000 Z
11
+ date: 2018-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable