lib/aserto/directory/v3/importer.rb in aserto-0.31.1 vs lib/aserto/directory/v3/importer.rb in aserto-0.31.2

- old
+ new

@@ -31,9 +31,17 @@ # } # ] # ) def import(data) data.map! do |value| + if value.dig(:object, :properties) + require "google/protobuf/well_known_types" + + value[:object][:properties] = Google::Protobuf::Struct.from_hash( + value[:object][:properties].transform_keys(&:to_s) + ) + end + Aserto::Directory::Importer::V3::ImportRequest.new(value) end operation = importer.import(data, return_op: true) response = operation.execute response.each { |r| } # ensures that the server sends trailing data