lib/persevere_adapter.rb in dm-persevere-adapter-0.71.0 vs lib/persevere_adapter.rb in dm-persevere-adapter-0.71.1
- old
+ new
@@ -528,15 +528,17 @@
DataMapper.logger.error("You need an id key/value in the hash")
end
end
scrub_schema(schema_hash['properties'])
+ properties = schema_hash.delete('properties')
schema_hash['extends'] = { "$ref" => "/Class/Versioned" } if @options[:versioned]
schema_hash.delete_if{|key,value| value.nil? }
result = @persevere.create(path, schema_hash)
if result.code == '201'
-
- return JSON.parse(result.body)
+ # return JSON.parse(result.body)
+ schema_hash['properties'] = properties
+ return update_schema(schema_hash)
else
return false
end
end
\ No newline at end of file