lib/cfndsl/generate_types.rb
# Do a little sanity checking - all of the types referenced in Resources
# should be represented in Types
Do a little sanity checking - all of the types referenced in Resources
should be represented in Types
Do a little sanity checking - all of the types referenced in Resources should be represented in Types
def validate_types(types)
      types['Resources'].values.each do |resource|
        resource.values.each do |thing|
          thing.values.flatten.each do |type|
            puts "unknown type #{type}" unless types['Types'].key?(type)
          end
        end
      end
      types['Types'].values do |type|
        next unless type.respond_to?(:values)
        type.values.each do |tv|
          puts "unknown type #{tv}" unless types['Types'].key?(tv)
        end
      end
    end
def validate_types ( types ) types [ 'Resources' ] . values . each do | resource | resource . values . each do | thing | thing . values . flatten . each do | type | puts "unknown type #{type}" unless types [ 'Types' ] . key? ( type ) end end end types [ 'Types' ] . values do | type | next unless type . respond_to? ( :values ) type . values . each do | tv | puts "unknown type #{tv}" unless types [ 'Types' ] . key? ( tv ) end end end
Do a little sanity checking - all of the types referenced in Resources
should be represented in Types
Do a little sanity checking - all of the types referenced in Resources should be represented in Types
# All of the type values should also be references
types