@@ -233,6 +233,7 @@ class schemaArray {
233
233
return (ConvertFrom-SchemaArray - Array $this )[0 ]
234
234
}
235
235
[object ]ToObject([int ]$Depth ) {
236
+ write-verbose $this | out-String
236
237
return (ConvertFrom-SchemaArray - Array $this - depth $Depth )[0 ]
237
238
}
238
239
}
@@ -931,13 +932,13 @@ function ConvertTo-Element {
931
932
Write-Verbose $oprop
932
933
if ($oprop -eq ' $ref' ) {
933
934
if ($Object.items .($oprop ).contains(' definitions' )) {
934
- $Result = Get-SchemaDefinition - Reference $Object.items .($oprop )
935
+ $Result.items + = Get-SchemaDefinition - Reference $Object.items .($oprop )
935
936
}
936
937
elseif ($Object.items .($oprop ).contains(' http' )) {
937
- $Result = Get-SchemaReference - Reference $Object.items .($oprop )
938
+ $Result.items + = Get-SchemaReference - Reference $Object.items .($oprop )
938
939
}
939
940
else {
940
- $Result = Get-SchemaDefinition - Reference $Object.items .($oprop )
941
+ $Result.items + = Get-SchemaDefinition - Reference $Object.items .($oprop )
941
942
}
942
943
} else {
943
944
$Result.items += ($Object.items .$oprop.GetEnumerator () | ForEach-Object { ((New-SchemaProperty - Name $oprop - Value (ConvertTo-SchemaElement - object $_ ) - Array $oprop )) })
@@ -1047,10 +1048,11 @@ function ConvertFrom-Array {
1047
1048
Write-Verbose " ConvertFrom-Array: Calculated: $ ( $Depth ) "
1048
1049
foreach ($item in $Array.items ) {
1049
1050
Write-Verbose " ConvertFrom-Array: Found: $ ( $item | Out-string ) "
1050
- foreach ($key in $item.psobject.Properties.name ) {
1051
- Write-Verbose " ConvertFrom-Array: Found: $ ( $key ) "
1052
- $retVal += (ConvertFrom-SchemaObject - Object $item .$key - depth $Depth )
1053
- }
1051
+ # foreach ($key in $item.psobject.Properties.name) {
1052
+ # Write-Verbose "ConvertFrom-Array: Found: $($key)"
1053
+ # $retVal += (ConvertFrom-SchemaObject -Object $item.$key -depth $Depth)
1054
+ $retVal += (ConvertFrom-SchemaObject - Object $item - depth $Depth )
1055
+ # }
1054
1056
}
1055
1057
}
1056
1058
return $retVal
0 commit comments