Skip to content

Commit

Permalink
better checks
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor committed Feb 1, 2019
1 parent f036d55 commit 2e2523b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ def check_resource_ref_exists

def check_resource_ref_property_exists
exported_props = resource_ref.all_user_properties
exported_props << Api::Type::String.new('selfLink') \
if resource_ref.has_self_link
raise "'#{@imports}' does not exist on '#{@resource}'" \
if exported_props.none? { |p| p.name == @imports }
end
Expand Down

0 comments on commit 2e2523b

Please sign in to comment.