File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -841,7 +841,16 @@ function ConvertTo-Element {
841
841
write-verbose ($Object.items.psobject.properties.name | out-string )
842
842
Write-Verbose " Found valid array object"
843
843
Write-Verbose $oprop
844
- $Result.items += ($Object.items .$oprop.GetEnumerator () | ForEach-Object { ((New-SchemaProperty - Name $oprop - Value (ConvertTo-SchemaElement - object $_ ) - Array $oprop )) })
844
+ if ($oprop -eq ' $ref' ) {
845
+ if ($Object.items .($oprop ).contains(' definitions' )) {
846
+ $Result = Get-SchemaDefinition - Reference $Object.items .($oprop )
847
+ }
848
+ else {
849
+ $Result = Get-SchemaReference - Reference $Object.items .($oprop )
850
+ }
851
+ } else {
852
+ $Result.items += ($Object.items .$oprop.GetEnumerator () | ForEach-Object { ((New-SchemaProperty - Name $oprop - Value (ConvertTo-SchemaElement - object $_ ) - Array $oprop )) })
853
+ }
845
854
}
846
855
}
847
856
}
You can’t perform that action at this time.
0 commit comments