Skip to content

Reducing changes in Generated SDK Sample Files for SDK PR #15825

@lirenhe

Description

@lirenhe

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.

Metadata

Metadata

Labels

API Spec & SDK release processAPI Spec & SDK library creation, generation, and publishing processes.
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions