schai 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schai/json_schema/js_object.rb +1 -5
- data/lib/schai/json_schema/js_root.rb +4 -0
- data/lib/schai/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e78f9d1d128dc77c7739ade60e7cf36897d55f2
|
4
|
+
data.tar.gz: 559dfe741a2314abd0a3932c6ec078916cd08d8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f711090896f3dd02d0a6cbfa9d2e5c98c79e42e669fc2e12c18023347c4d25a48461185fc067fde7e551ac05bb00388d44675ac11e5321a5aaf10e9fefa9955
|
7
|
+
data.tar.gz: 525cc14f8520e4668837af370284fd764bc3f163add259ddba8a25cb961e393eff4c697af0c151977be3989ccfe62de555a08be588a089eb722d6009244c145b
|
@@ -7,13 +7,9 @@ module Schai
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def initialize params
|
10
|
-
params["properties"].select! do |k, e|
|
11
|
-
!(Schai.current_parsing_file?(e['include']) and e['optional'])
|
12
|
-
end
|
13
|
-
|
14
10
|
@all = Hash[params["properties"].map {|k, v|
|
15
11
|
[k || 'null', JsRoot.parse_components(v)]
|
16
|
-
}]
|
12
|
+
}.select{|p| !p[1].nil? }]
|
17
13
|
@description = params["description"]
|
18
14
|
@example = params["example"]
|
19
15
|
@optional = params["optional"]
|
@@ -10,6 +10,10 @@ module Schai
|
|
10
10
|
|
11
11
|
def self.parse_components params
|
12
12
|
# include other .yaml file
|
13
|
+
if Schai.current_parsing_file?(params['include']) and params['optional']
|
14
|
+
return nil
|
15
|
+
end
|
16
|
+
|
13
17
|
if params.has_key?('include')
|
14
18
|
included_schema = Schai.parse_file(params.delete('include')).schema
|
15
19
|
params.each do |k, v|
|
data/lib/schai/version.rb
CHANGED