-
Notifications
You must be signed in to change notification settings - Fork 227
examples-automation, special handling for azure-resourcemanager at tsp #13447
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
examples-automation, special handling for azure-resourcemanager at tsp #13447
Conversation
|
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. |
e62f6a1 to
bc20257
Compare
There was a problem hiding this 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 |
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.jsontospecification/keyvault/resource-manager/Microsoft.KeyVault/stable/2025-05-01/examples/listSecrets.json