File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -293,6 +293,7 @@ class schemaDocument {
293
293
}
294
294
}
295
295
}
296
+ $Global :RawSchema = $null ;
296
297
function Get-Document {
297
298
[CmdletBinding (
298
299
HelpURI = ' https://github.com/SchemaModule/PowerShell/blob/master/docs/Get-SchemaDocument.md#get-schemadocument' ,
@@ -317,17 +318,19 @@ function Get-Document {
317
318
switch ($Schema.Scheme ) {
318
319
' file' {
319
320
Write-Verbose " Incoming Filepath" ;
320
- Return (ConvertTo-SchemaElement - object (Get-Content - Path $Path | ConvertFrom-Json ) - IsRootSchema);
321
+ $Global :RawSchema = (Get-Content - Path $Path | ConvertFrom-Json );
322
+
321
323
}
322
324
' https' {
323
325
Write-Verbose " Incoming HTTPs path" ;
324
- Return ( ConvertTo-SchemaElement - object (Invoke-WebRequest - UseBasicParsing - Uri $Path | ConvertFrom-Json ) - IsRootSchema );
326
+ $ Global :RawSchema = (Invoke-WebRequest - UseBasicParsing - Uri $Path | ConvertFrom-Json );
325
327
}
326
328
' http' {
327
329
Write-Verbose " Incoming HTTP path" ;
328
- Return ( ConvertTo-SchemaElement - object (Invoke-WebRequest - UseBasicParsing - Uri $Path | ConvertFrom-Json ) - IsRootSchema );
330
+ $ Global :RawSchema = (Invoke-WebRequest - UseBasicParsing - Uri $Path | ConvertFrom-Json );
329
331
}
330
332
}
333
+ Return (ConvertTo-SchemaElement - object $Global :RawSchema - IsRootSchema);
331
334
}
332
335
catch {
333
336
throw $_ ;
You can’t perform that action at this time.
0 commit comments