Skip to content

Commit 962a374

Browse files
committed
Add 'name' parameter to the 'resource_hash' for references validating
1 parent 8774031 commit 962a374

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/octocatalog-diff/catalog.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,9 @@ def build_resource_hash
331331
title = normalized_title(resource['title'], resource['type'])
332332
@resource_hash[resource['type']][title] = resource
333333

334-
if resource.key?('parameters') && resource['parameters'].key?('alias')
335-
@resource_hash[resource['type']][resource['parameters']['alias']] = resource
334+
if resource.key?('parameters')
335+
@resource_hash[resource['type']][resource['parameters']['alias']] = resource if resource['parameters'].key?('alias')
336+
@resource_hash[resource['type']][resource['parameters']['name']] = resource if resource['parameters'].key?('name')
336337
end
337338
end
338339
end

0 commit comments

Comments
 (0)