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 running the cmdlet Get-AzApiManagementApiSchema on an API with a content type of application/vnd.oai.openapi.components+json (OpenAPI v3), the command fails:
If you need to create an OpenApi v3 api, uncomment the line below to import the petstore example
$apim=Get-AzApiManagement# only works if there is one apim instance in the subscription$apiMgmtContext=New-AzApiManagementContext-ResourceGroupName $apim.ResourceGroupName-ServiceName $apim.Name# TODO: change the id if necessary$openApiApiId='swagger-petstore-openapi'# TODO: run this if you need to create an api to test with#Import-AzApiManagementApi -Context $apiMgmtContext -ApiId $openApiApiId -SpecificationUrl https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml -Protocol https -Path petstore-openapi-test -SpecificationFormat OpenApiGet-AzApiManagementApiSchema-ApiId $openApiApiId-Context $apiMgmtContext
The json returned by Azure's rest api is different for openapi because it doesn't return the "value" property which is expected. It returns "components" for application/vnd.oai.openapi.components+json.
Description
When running the cmdlet
Get-AzApiManagementApiSchema
on an API with a content type ofapplication/vnd.oai.openapi.components+json
(OpenAPI v3), the command fails:Steps to reproduce
If you need to create an OpenApi v3 api, uncomment the line below to import the petstore example
Environment data
Module versions
Debug output
(subset as most of the rest was related to authenticating)
Error output
The text was updated successfully, but these errors were encountered: