You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a new API revision with the New-AzApiManagementApiRevision commandlet, the value set using the -ApiRevisionDescription parameter does not get set on the resulting API object.
Steps to reproduce
Running the following script against an existing API in API Management will result in a blank description in the final output statement. Additionally, no description shows in the publisher portal when viewing the new revision.
Write-Host"Searching for API with ID '$apiId'"-ForegroundColor Yellow
$api=Get-AzApiManagementApi-Context $apimContext-ApiId $apiId-ErrorAction SilentlyContinue
$revision=$nullif ($null-eq$api) {
Write-Host"No API with ID '$apiId' found"-ForegroundColor Yellow
Write-Host"Importing new API with ID '$apiId' to API Management"-ForegroundColor Yellow
# TODO: Import new API$revision=Get-AzApiManagementApiRevision-Context $apimContext-ApiId $api.ApiId|Where-Object {$_.IsCurrent-eq$true }
Write-Host"Revision '$($revision.ApiRevision)' created"-ForegroundColor Green
} else {
Write-Host"API named $($api.Name) found"-ForegroundColor Green
Write-HostWrite-Host"Checking current API revision"-ForegroundColor Yellow
$revision=Get-AzApiManagementApiRevision-Context $apimContext-ApiId $api.ApiId|Where-Object {$_.IsCurrent-eq$true }
Write-Host"Current revision is '$($revision.ApiRevision)'"-ForegroundColor Green
Write-HostWrite-Host"Creating new API revision"-ForegroundColor Yellow
$api=`New-AzApiManagementApiRevision`-Context $apimContext`-ApiId $apiId`-ApiRevision "2019-07-31"`-ApiRevisionDescription "This is a new revision."`-SourceApiRevision $revision.ApiRevisionWrite-Host"Revision '$($api.ApiRevision)' created with description '$($api.ApiRevisionDescription)'"-ForegroundColor Green
Write-Host
}
Searching for API with ID 'some-api'
API named Some API found
Checking current API revision
Current revision is '1'
Creating new API revision
Revision '2019-07-31' created with description ''
Error output
HistoryId: 13
Message :
Error Code: ValidationError
Error Message: One or more fields contain incorrect values:
Request Id: c952b7f7-1f36-4137-a56f-bfb38e314172
Error Details:
[Code= ValidationError, Message= Parsing error(s): Composite Schema TlOrderRequest must contain property specified in the discriminator orderType.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf]
Composite schema TlOrderRequest must contain property specified in the discriminator orderType in the required field list.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf]
Composite Schema ItemizedTlOrderRequest must contain property specified in the discriminator orderType.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf]
Composite schema ItemizedTlOrderRequest must contain property specified in the discriminator orderType in the required field list.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf]
Composite Schema IntermodalOrderRequest must contain property specified in the discriminator orderType.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf]
Composite schema IntermodalOrderRequest must contain property specified in the discriminator orderType in the required field list.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf]
Composite Schema LtlOrderRequest must contain property specified in the discriminator orderType.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf]
Composite schema LtlOrderRequest must contain property specified in the discriminator orderType in the required field list.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf]
Composite Schema FinalMileOrderRequest must contain property specified in the discriminator orderType.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf]
Composite schema FinalMileOrderRequest must contain property specified in the discriminator orderType in the required field list.
[#/components/schemas/OrderCreationRequest/properties/order/oneOf], Target= representation]
StackTrace :
Exception : System.Exception
InvocationInfo : {Import-AzApiManagementApi}
Line : Import-AzApiManagementApi `
Position : At C:\Source\apim-cicd\apim-deploy.ps1:62 char:9
+ Import-AzApiManagementApi `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 13
HistoryId: 5
Message :
Error Code: ValidationError
Error Message: One or more fields contain incorrect values:
Request Id: 7ec0e23f-2393-4b80-b4d1-0667416e5df3
Error Details:
[Code= ValidationError, Message= Invalid identifier 2.0.0 specified. Entity Identifier can contain only letters, numbers, and hyphens. The first and last
character must be a letter or a number , Target= aid]
StackTrace :
Exception : System.Exception
InvocationInfo : {New-AzApiManagementApiRevision}
Line : $api = New-AzApiManagementApiRevision -Context $apimContext -ApiId $apiId -ApiRevision "2.0.0" -ApiRevisionDescription "This is a new revision."
Position : At C:\Source\apim-cicd\apim-deploy.ps1:49 char:12
+ $api = New-AzApiManagementApiRevision -Context $apimContext -ApiI ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 5
The text was updated successfully, but these errors were encountered:
Description
When creating a new API revision with the
New-AzApiManagementApiRevision
commandlet, the value set using the-ApiRevisionDescription
parameter does not get set on the resulting API object.Steps to reproduce
Running the following script against an existing API in API Management will result in a blank description in the final output statement. Additionally, no description shows in the publisher portal when viewing the new revision.
Environment data
Module versions
Debug output
Error output
The text was updated successfully, but these errors were encountered: