diff --git a/scripts/run-metadata-validation.ps1 b/scripts/run-metadata-validation.ps1
index fae22b1a8..d56a353fe 100644
--- a/scripts/run-metadata-validation.ps1
+++ b/scripts/run-metadata-validation.ps1
@@ -36,7 +36,7 @@ $snapshot = Join-Path $repoDirectory "$($version)_metadata.xml"
$transformed = Join-Path $repoDirectory "transformed_$($version)_metadata.xml"
Write-Host "Tranforming $snapshot metadata using xslt with parameters used in the OpenAPI flow..." -ForegroundColor Green
-& $transformScript -xslPath $xsltPath -inputPath $snapshot -outputPath $transformed -addInnerErrorDescription $true -removeCapabilityAnnotations $false
+& $transformScript -xslPath $xsltPath -inputPath $snapshot -outputPath $transformed -addInnerErrorDescription $true -removeCapabilityAnnotations $false -csdlVersion $version
Write-Host "Validating $transformed metadata after the transform..." -ForegroundColor Green
& dotnet tool install Microsoft.OpenApi.Hidi -g --prerelease
diff --git a/transforms/csdl/preprocess_csdl.xsl b/transforms/csdl/preprocess_csdl.xsl
index 7123a7e91..85d338281 100644
--- a/transforms/csdl/preprocess_csdl.xsl
+++ b/transforms/csdl/preprocess_csdl.xsl
@@ -6,6 +6,7 @@
True
False
+ v1_0
diff --git a/transforms/csdl/transform.ps1 b/transforms/csdl/transform.ps1
index d987fc448..793c27880 100644
--- a/transforms/csdl/transform.ps1
+++ b/transforms/csdl/transform.ps1
@@ -13,7 +13,9 @@ param (
[bool]
$removeCapabilityAnnotations = $true,
[bool]
- $addInnerErrorDescription = $false
+ $addInnerErrorDescription = $false,
+ [string]
+ $csdlVersion = $v1_0
)
function Get-PathWithPrefix([string]$requestedPath) {
if ([System.IO.Path]::IsPathRooted($requestedPath)) {
@@ -40,6 +42,7 @@ $outputFullPath = Get-PathWithPrefix -requestedPath $outputPath
$xsltargs = [System.Xml.Xsl.XsltArgumentList]::new()
$xsltargs.AddParam("remove-capability-annotations", "", $removeCapabilityAnnotations.ToString())
$xsltargs.AddParam("add-innererror-description", "", $addInnerErrorDescription.ToString())
+$xsltargs.AddParam("csdlVersion", "", $csdlVersion)
$xmlWriterSettings = [System.Xml.XmlWriterSettings]::new()
$xmlWriterSettings.Indent = $true
@@ -56,4 +59,4 @@ catch {
}
finally {
$xmlWriter.Close()
-}
\ No newline at end of file
+}