Skip to content

Commit

Permalink
Add 'name' parameter to the 'resource_hash' for references validating
Browse files Browse the repository at this point in the history
  • Loading branch information
xakraz committed Nov 20, 2018
1 parent 8774031 commit 962a374
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/octocatalog-diff/catalog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,9 @@ def build_resource_hash
title = normalized_title(resource['title'], resource['type'])
@resource_hash[resource['type']][title] = resource

if resource.key?('parameters') && resource['parameters'].key?('alias')
@resource_hash[resource['type']][resource['parameters']['alias']] = resource
if resource.key?('parameters')
@resource_hash[resource['type']][resource['parameters']['alias']] = resource if resource['parameters'].key?('alias')
@resource_hash[resource['type']][resource['parameters']['name']] = resource if resource['parameters'].key?('name')
end
end
end
Expand Down

0 comments on commit 962a374

Please sign in to comment.