Skip to content

Commit

Permalink
Add additional key searches for future use, add new piece to developm…
Browse files Browse the repository at this point in the history
…ent plan
  • Loading branch information
DaveTD committed Jan 23, 2016
1 parent 081337e commit c4154e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion lib/superstudio.rb
Expand Up @@ -63,6 +63,15 @@ def interpret_json_schema(json_hash, depth = 0, path_array = [], expected_mappin
end
end

if key == "required"
# this will be especially important since according to http://spacetelescope.github.io/understanding-json-schema/reference/object.html
# each required string must be unique - which gives us an opportunity to use much shorter
end

if key == "patternProperties"
# this will let this library output uniquely keyed properties - which will be especially useful if we want to create ID keyed hashes
end

if json_hash[key].is_a?(Hash)
new_path_array = path_array.dup
new_depth = depth
Expand Down Expand Up @@ -228,7 +237,8 @@ def clean_data_types(row_hash, template_types)

# version 0.6.x - support arrays of objects
# version 0.7.x - automatically generate data maps with all expected variables
# version 0.8.x - support all settings for current draft of json schema
# version 0.8.x - support patternProperties
# version 0.9.x - support all settings for current draft of json schema
# version 1.0.x - test suite

# At some point I will address the problem of referencing schemas that define a node to be used, and of using references that are not on the same server
Expand Down
2 changes: 1 addition & 1 deletion superstudio.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'superstudio'
s.version = '0.6.1'
s.version = '0.6.2'
s.date = '2016-01-04'
s.summary = "An alternative way of thinking about creating JSON output: life without creating ruby objects."
s.description = ""
Expand Down

0 comments on commit c4154e3

Please sign in to comment.