oas_parser 0.25.3 → 0.25.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 +4 -4
- data/Gemfile.lock +15 -16
- data/lib/oas_parser/parameter.rb +5 -1
- data/lib/oas_parser/pointer.rb +0 -1
- data/lib/oas_parser/property.rb +6 -1
- data/lib/oas_parser/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: 2213c3566edd008f67d8101c16f0fe6e6a964a5b8bc60488f3f5718dfb067903
|
|
4
|
+
data.tar.gz: f01a797c4f0c6d95df74e6b6325d3c90751c3070f91e61119a7f8f9d248cb9a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca4415f528209d4c073750aa49a5564ef53d2dfba2b37920cb004b8df4ffc30a062c620f889e315e5005752c0354695c36a7ceb1108cb9bca80ec5f56082b2d8
|
|
7
|
+
data.tar.gz: 0dbaca88baddcd7d40ec0552de4e0872375cb28999f7470536024c70efd1358b74effef738dfa81d0f9d2d16d4bcc7e6879fa60becde4ccce0b87a9f7c20e713
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
oas_parser (0.25.
|
|
4
|
+
oas_parser (0.25.4)
|
|
5
5
|
activesupport (>= 4.0.0)
|
|
6
6
|
addressable (~> 2.3)
|
|
7
7
|
builder (~> 3.2.3)
|
|
@@ -13,17 +13,17 @@ PATH
|
|
|
13
13
|
GEM
|
|
14
14
|
remote: https://rubygems.org/
|
|
15
15
|
specs:
|
|
16
|
-
activesupport (6.
|
|
16
|
+
activesupport (6.1.3.1)
|
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
|
-
i18n (>=
|
|
19
|
-
minitest (
|
|
20
|
-
tzinfo (~>
|
|
21
|
-
zeitwerk (~> 2.
|
|
18
|
+
i18n (>= 1.6, < 2)
|
|
19
|
+
minitest (>= 5.1)
|
|
20
|
+
tzinfo (~> 2.0)
|
|
21
|
+
zeitwerk (~> 2.3)
|
|
22
22
|
addressable (2.7.0)
|
|
23
23
|
public_suffix (>= 2.0.2, < 5.0)
|
|
24
24
|
builder (3.2.4)
|
|
25
25
|
coderay (1.1.2)
|
|
26
|
-
concurrent-ruby (1.1.
|
|
26
|
+
concurrent-ruby (1.1.8)
|
|
27
27
|
deep_merge (1.2.1)
|
|
28
28
|
diff-lcs (1.3)
|
|
29
29
|
docile (1.1.5)
|
|
@@ -45,7 +45,7 @@ GEM
|
|
|
45
45
|
rspec (>= 2.99.0, < 4.0)
|
|
46
46
|
hansi (0.2.0)
|
|
47
47
|
hash-deep-merge (0.1.1)
|
|
48
|
-
i18n (1.8.
|
|
48
|
+
i18n (1.8.10)
|
|
49
49
|
concurrent-ruby (~> 1.0)
|
|
50
50
|
json (2.3.1)
|
|
51
51
|
listen (3.1.5)
|
|
@@ -55,14 +55,14 @@ GEM
|
|
|
55
55
|
lumberjack (1.0.13)
|
|
56
56
|
method_source (0.9.2)
|
|
57
57
|
mini_portile2 (2.5.0)
|
|
58
|
-
minitest (5.14.
|
|
58
|
+
minitest (5.14.4)
|
|
59
59
|
mustermann (1.1.1)
|
|
60
60
|
ruby2_keywords (~> 0.0.1)
|
|
61
61
|
mustermann-contrib (1.1.1)
|
|
62
62
|
hansi (~> 0.2.0)
|
|
63
63
|
mustermann (= 1.1.1)
|
|
64
64
|
nenv (0.3.0)
|
|
65
|
-
nokogiri (1.11.
|
|
65
|
+
nokogiri (1.11.3)
|
|
66
66
|
mini_portile2 (~> 2.5.0)
|
|
67
67
|
racc (~> 1.4)
|
|
68
68
|
notiffany (0.1.1)
|
|
@@ -71,7 +71,7 @@ GEM
|
|
|
71
71
|
pry (0.11.3)
|
|
72
72
|
coderay (~> 1.1.0)
|
|
73
73
|
method_source (~> 0.9.0)
|
|
74
|
-
public_suffix (4.0.
|
|
74
|
+
public_suffix (4.0.6)
|
|
75
75
|
racc (1.5.2)
|
|
76
76
|
rake (13.0.1)
|
|
77
77
|
rb-fsevent (0.10.3)
|
|
@@ -92,7 +92,7 @@ GEM
|
|
|
92
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
93
93
|
rspec-support (~> 3.8.0)
|
|
94
94
|
rspec-support (3.8.0)
|
|
95
|
-
ruby2_keywords (0.0.
|
|
95
|
+
ruby2_keywords (0.0.4)
|
|
96
96
|
ruby_dep (1.5.0)
|
|
97
97
|
shellany (0.0.1)
|
|
98
98
|
simplecov (0.15.1)
|
|
@@ -101,10 +101,9 @@ GEM
|
|
|
101
101
|
simplecov-html (~> 0.10.0)
|
|
102
102
|
simplecov-html (0.10.2)
|
|
103
103
|
thor (0.20.3)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
zeitwerk (2.3.0)
|
|
104
|
+
tzinfo (2.0.4)
|
|
105
|
+
concurrent-ruby (~> 1.0)
|
|
106
|
+
zeitwerk (2.4.2)
|
|
108
107
|
|
|
109
108
|
PLATFORMS
|
|
110
109
|
ruby
|
data/lib/oas_parser/parameter.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module OasParser
|
|
2
2
|
class Parameter < AbstractAttribute
|
|
3
3
|
raw_keys :in, :description, :style, :schema,
|
|
4
|
-
:minimum, :maximum, :required
|
|
4
|
+
:minimum, :maximum, :required, :nullable
|
|
5
5
|
|
|
6
6
|
attr_accessor :owner, :raw
|
|
7
7
|
|
|
@@ -31,6 +31,10 @@ module OasParser
|
|
|
31
31
|
raw['default'] || (schema ? schema['default'] : nil)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
def nullable?
|
|
35
|
+
raw['nullable'] || (schema ? schema['nullable'] : nil )
|
|
36
|
+
end
|
|
37
|
+
|
|
34
38
|
def convert_property_schema_to_properties(schema)
|
|
35
39
|
schema.map do |name, definition|
|
|
36
40
|
OasParser::Property.new(self, raw, name, definition)
|
data/lib/oas_parser/pointer.rb
CHANGED
data/lib/oas_parser/property.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module OasParser
|
|
2
2
|
class Property < AbstractAttribute
|
|
3
3
|
raw_keys :description, :type, :format, :minimum, :maximum,
|
|
4
|
-
:example, :default, :items
|
|
4
|
+
:example, :default, :items, :nullable
|
|
5
5
|
|
|
6
6
|
attr_accessor :owner, :schema, :raw
|
|
7
7
|
attr_writer :name
|
|
@@ -18,6 +18,11 @@ module OasParser
|
|
|
18
18
|
schema['required'].include? name
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
+
def nullable?
|
|
22
|
+
return true if raw['nullable']
|
|
23
|
+
return false unless schema['nullable']
|
|
24
|
+
end
|
|
25
|
+
|
|
21
26
|
def convert_property_schema_to_properties(schema)
|
|
22
27
|
if schema['allOf']
|
|
23
28
|
schema['properties'] = {}
|
data/lib/oas_parser/version.rb
CHANGED
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.25.
|
|
4
|
+
version: 0.25.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Butler
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-04-
|
|
11
|
+
date: 2021-04-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|