Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Commit

Permalink
Build missing data objects from wsdl
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Jun 15, 2021
1 parent 651a41d commit 8464e48
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion devel/verify-vim-wsdl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,24 @@ def wsdl_constantize(type)
# Print a warning that the type is missing and skip it.
if vmodl_data.nil?
puts " #{type_name} is missing"
next
next unless options[:fix]

vmodl_data = {
'kind' => 'data',
'wsdl_base' => type.complexcontent.extension.base.name,
'props' => type.elements.map do |element|
{
'name' => element.name.name,
'is-optional' => element.minoccurs == 0,
'is-array' => element.maxoccurs != 1,
'version-id-ref' => nil,
'wsdl_type' => wsdl_to_vmodl_type(element.type.name)
}
end
}

vmodl[type_name] = vmodl_data
vmodl['_typenames']['_typenames'] << type_name
end

# Index the properties by name to make it simpler to find later
Expand Down

0 comments on commit 8464e48

Please sign in to comment.