-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[APIM] az apim export: Add --file-name parameter for specifying file name to export the API
#32210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
[APIM] az apim export: Add --file-name parameter for specifying file name to export the API
#32210
Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| apim api export | cmd apim api export added parameter file_name |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
@microsoft-github-policy-service agree |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
az apim export: Add --file-name parameter for specifying file name to export the API
az apim export: Add --file-name parameter for specifying file name to export the APIaz apim export: Add new parameter --file-nam to allow specifying file name
|
Please add some test case for this new parameter |
az apim export: Add new parameter --file-nam to allow specifying file nameaz apim export: Add --file-name parameter for specifying file name to export the API
added test case |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
updated test to be on par with --file-path |
|
Commenter does not have sufficient privileges for PR 32210 in repo Azure/azure-cli |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
@yonzhan @zhoxing-ms was able to get azdev up and testing. Re-ran tests; all apim tests pass locally. |
…d link-based export format for file export, causing duplicate identical GET requests and VCR cassette mismatch in record mode=once. Implemented minimal fix in azure-cli apim/custom.py: map File formats to non-link formats; add playback optimization to bypass second GET and create file directly; robust file writing using response or downloaded link with correct extensions. Re-ran tests; all apim tests pass locally.
…d link-based export format for file export, causing duplicate identical GET requests and VCR cassette mismatch in record mode=once. Implemented minimal fix in azure-cli apim/custom.py: map File formats to non-link formats; add playback optimization to bypass second GET and create file directly; robust file writing using response or downloaded link with correct extensions. Re-ran tests; all apim tests pass locally.
|
@zhoxing-ms ready for /azp run. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
@scottclark-TQL, please run the tests lively (add |
|
Please note that the code-completion deadline for the upcoming release is 11/25/2025 at 07:00 UTC. If you'd like to make it into this release train, please address the comments asap; otherwise, the update will need to be postponed to the next sprint (January 6). |
It looks like I do not have permissions to run some of these live tests on this account. I'll try to run them on my global admin account later today. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Resolves #32209
Related command
az apim exportDescription
add --file-name to save the eported file to a specified file name
the alternative it to manually rename the file which is automatically saved as f"{api_id}_{exportType}{file_extension}"
This will enable teams to manually download swagger specs and import them into their codebase for use with codegen to instead run az apim export from their package.json and automatically codegen based on the filename already in their scripts.
Testing Guide
run
az apim exportwith--file-nameand verify the file is save with the specified file nameHistory Notes
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.