Skip to content

Commit

Permalink
#schema validation script (#3379)
Browse files Browse the repository at this point in the history
* #schema validation script

* black reformatting

* converting to ps file
  • Loading branch information
achauhan-scc authored Sep 10, 2024
1 parent 4029d3d commit 5782330
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions infra/validation/schema_valdiation.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$validation_list = "pipelineComponent,workspace,environment,dataset,model"
$validation_entities = $validation_list.split(",");
foreach ($validation_entity in $validation_entities) {
Write-Output $validation_entity
$uri = "https://azuremlschemas.azureedge.net/latest/$validation_entity.schema.json"
Write-Output "validating $uri"
$response = Invoke-RestMethod -Uri $uri -Method Get
if ([bool]($response.PSobject.Properties.name -match "definitions")){
Write-Output "success $validation_entity"
}
else{
Write-Output "fail $validation_entity"
throw [System.IO.FileNotFoundException] "$validation_entity not found."
}
}

0 comments on commit 5782330

Please sign in to comment.