oas_parser 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/oas_parser/abstract_attribute.rb +5 -0
- data/lib/oas_parser/property.rb +16 -3
- data/lib/oas_parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 603bbd2df525a4d19c34e56682551c5a7e4e8461
|
4
|
+
data.tar.gz: b9f59dfd1eab36b7674525e146a92e04bc8d2b27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b51dd2fada44ae1d4f29e04f603341e209f8ee1b88987d8283456fe7c6bac7745b5a6dd03a98f9679532450dccb9c6b8bdab7577e134a51031fc95b0f72a6721
|
7
|
+
data.tar.gz: f94e183e9113c5ecf89b30b0c3d59d3db2a64cd8caf299aac0e2f1ac7048a355714f983670340620bbbc148d5b6c60c02311bcba39f47780a8d28304fcc65fc5
|
data/Gemfile.lock
CHANGED
data/lib/oas_parser/property.rb
CHANGED
@@ -20,9 +20,22 @@ module OasParser
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def convert_property_schema_to_properties(schema)
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
if schema['oneOf']
|
24
|
+
schema['oneOf'].map do |subschema|
|
25
|
+
subschema['properties'] = convert_property_schema_to_properties(subschema)
|
26
|
+
subschema['subschema_property'] = true
|
27
|
+
subschema
|
28
|
+
end
|
29
|
+
elsif schema['subschema_property']
|
30
|
+
schema = schema['properties'] if schema['properties']
|
31
|
+
schema.map do |definition|
|
32
|
+
OasParser::Property.new(self, raw, definition.name, definition)
|
33
|
+
end
|
34
|
+
else
|
35
|
+
schema = schema['properties'] if schema['properties']
|
36
|
+
schema.map do |key, definition|
|
37
|
+
OasParser::Property.new(self, raw, key, definition)
|
38
|
+
end
|
26
39
|
end
|
27
40
|
end
|
28
41
|
end
|
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.
|
4
|
+
version: 0.11.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-03-
|
11
|
+
date: 2018-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|