Context
Today, we generate SDK samples as part of the SDK PR for release to show those samples in doc site.
However, there is a large number of generated example files included in each SDK PR.
Azure/azure-sdk-for-js#38549
As we increasingly rely on AI in SDK PR review, the large volume of generated SDK sample files can become problematic for AI-based review.
Most of the changes were related to file mapping updates rather than meaningful sample logic changes.
Proposal:
Introduce a sample_metadata.json that maps the original Swagger/TypeSpec file
For example:
file_shares_get_stats.py:
x-ms-original-file: 2026-04-01/FileServicesGetUsage.json:
If we define this metadata format clearly, most generated sample files would no longer need to change when a new API version is introduced.
Instead, only the metadata file would be updated, which should significantly reduce PR noise and make both human and AI reviews more effective.
Context
Today, we generate SDK samples as part of the SDK PR for release to show those samples in doc site.
However, there is a large number of generated example files included in each SDK PR.
Azure/azure-sdk-for-js#38549
As we increasingly rely on AI in SDK PR review, the large volume of generated SDK sample files can become problematic for AI-based review.
Most of the changes were related to file mapping updates rather than meaningful sample logic changes.
Proposal:
Introduce a
sample_metadata.jsonthat maps the original Swagger/TypeSpec fileFor example:
If we define this metadata format clearly, most generated sample files would no longer need to change when a new API version is introduced.
Instead, only the metadata file would be updated, which should significantly reduce PR noise and make both human and AI reviews more effective.