lib/autoparse/instance.rb in autoparse-0.2.0 vs lib/autoparse/instance.rb in autoparse-0.2.1

- old
+ new

@@ -202,10 +202,14 @@ return true end # Verify property values if schema_data['$ref'] - schema_uri = self.uri + Addressable::URI.parse(schema_data['$ref']) + if self.uri + schema_uri = self.uri + Addressable::URI.parse(schema_data['$ref']) + else + schema_uri = Addressable::URI.parse(schema_data['$ref']) + end schema = AutoParse.schemas[schema_uri] if schema == nil raise ArgumentError, "Could not find schema: #{schema_data['$ref']}. " + "Referenced schema must be parsed first."