Skip to content

Conversation

@PramodValavala-MSFT
Copy link
Contributor

@PramodValavala-MSFT PramodValavala-MSFT commented Feb 5, 2022

Description

When performing operations on an API in APIM using Azure CLI like create, import, or update, there are parameters available to set the subscription key header and query param name.

But as brought up in issue #21187, they are flipped. This PR fixes that and updates the tests accordingly.

After regenerating the test recording, I only include the relevant changes since the other changes were just to the User-Agent or etag values. Hope that is OK.

Testing Guide

# Create API
az apim api create --service-name {} -g {} --api-id MyApi --path '/myapi' --display-name 'My API' --subscription-key-header-name 'header' --subscription-key-query-param-name 'query'

# Update API
az apim api update --service-name {} -g {} --api-id MyApi --subscription-key-header-name 'header' --subscription-key-query-param-name 'query'

# Import API
az apim api import --service-name {} -g {} --api-id MyApi --path '/myapi' --specification-url https://petstore.swagger.io/v2/swagger.json --specification-format OpenApiJson --subscription-key-header-name 'header' --subscription-key-query-param-name 'query'

resolves #21187


This checklist is used to make sure that common guidelines for a pull request are followed.

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 5, 2022

API Management

@yonzhan yonzhan added this to the Feb 2022 (2022-03-01) milestone Feb 5, 2022
@wangzelin007 wangzelin007 changed the title [API Management] Fix #21187: az apim api create/update/import: Fix header and query param names being swapped [API Management] Fix #21187: az apim api create/update/import: Fix header and query param names being swapped Feb 9, 2022
@zhoxing-ms zhoxing-ms changed the title [API Management] Fix #21187: az apim api create/update/import: Fix header and query param names being swapped [APIM] Fix #21187: az apim api create/update/import: Fix header and query param names being swapped Feb 9, 2022
@zhoxing-ms zhoxing-ms merged commit 82b7afe into Azure:dev Feb 9, 2022
@PramodValavala-MSFT PramodValavala-MSFT added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue requires a change to an existing behavior in the product in order to be resolved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az apim api import wrong parameters

4 participants