Skip to content

Commit

Permalink
refactor Schema::Ref google hax, drop unneeded check of the ref as th…
Browse files Browse the repository at this point in the history
…e key in the schemas object
  • Loading branch information
notEthan committed Jan 20, 2021
1 parent b38fe4b commit e7752e1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/jsi/schema/ref.rb
Expand Up @@ -57,9 +57,6 @@ def deref_schema
unless schema_resource_root
# HAX for how google does refs and ids
if ref_schema && ref_schema.jsi_document.respond_to?(:to_hash) && ref_schema.jsi_document['schemas'].respond_to?(:to_hash)
if ref_schema.jsi_document['schemas'][ref]
schema_resource_root = ref_schema.resource_root_subschema(['schemas', ref])
end
ref_schema.jsi_document['schemas'].each_key do |k|
if Addressable::URI.parse(ref_schema.jsi_document['schemas'][k]['id']) == ref_uri_nofrag
schema_resource_root = ref_schema.resource_root_subschema(['schemas', k])
Expand Down

0 comments on commit e7752e1

Please sign in to comment.