Skip to content

Conversation

@weidongxu-microsoft
Copy link
Member

azure-resourcemanager lib need a special handling for getting an example from complete Swagger filename from an incomplete TypeSpec filename.

e.g. from 2025-05-01/listSecrets.json to specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/listSecrets.json

@weidongxu-microsoft
Copy link
Member Author

weidongxu-microsoft commented Jan 4, 2026

Here is another incentive to see if we'd move the samples back to its lib (instead of in azure-resourcemanager lib).

This PR does not need to be merged, if we decided to do above.

@XiaofeiCao
Copy link

XiaofeiCao commented Jan 5, 2026

@weidongxu-microsoft weidongxu-microsoft marked this pull request as ready for review January 22, 2026 02:23
Copilot AI review requested due to automatic review settings January 22, 2026 02:23
@weidongxu-microsoft weidongxu-microsoft force-pushed the examples-automation_java-fix-example-location-from-tsp branch from e62f6a1 to bc20257 Compare January 22, 2026 02:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds special handling for the azure-resourcemanager library to correctly resolve example file paths from TypeSpec-generated incomplete paths to complete Swagger specification paths. The implementation extracts the service name from the sample file path and constructs the correct SDK package path to find the tsp-location.yaml file.

Changes:

  • Modified the example processing logic to handle azure-resourcemanager package specially by extracting service names from file paths
  • Added comprehensive test coverage for the new azure-resourcemanager handling scenario
  • Increased the release window from 10 to 15 days in the automation pipeline

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
tools/azure-rest-api-specs-examples-automation/samples-automation.yml Increased release window from 10 to 15 days
tools/azure-rest-api-specs-examples-automation/java/test_process.py Added test case and mock setup for azure-resourcemanager package handling
tools/azure-rest-api-specs-examples-automation/java/main.py Implemented special path resolution logic for azure-resourcemanager packages

@weidongxu-microsoft weidongxu-microsoft merged commit 88615cd into Azure:main Feb 2, 2026
5 checks passed
@weidongxu-microsoft weidongxu-microsoft deleted the examples-automation_java-fix-example-location-from-tsp branch February 2, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants