Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.49k stars 4.81k forks source link

[Azure client generator] Provide API listing for generated clients as part of PRs that updates to the generator #46992

Open annelo-msft opened 2 weeks ago

annelo-msft commented 2 weeks ago

For generated clients created by the Azure client generator such as BasicTypeSpecClient, architects and PR reviewers need to be able to view the clients' public APIs to be able to validate correctness of generated code compared to the input TypeSpec. In Azure clients, API listings are visible via API listing files in an /api/ directory that sits next to the package's /src/ directory, for example https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/appconfiguration/Azure.Data.AppConfiguration/api/Azure.Data.AppConfiguration.netstandard2.0.cs for the Azure.Data.AppConfiguration client library.

Please provide such API listings for output test clients so they can be reviewed as part of PRs that update the generator.

JoshLove-msft commented 3 days ago

We have something similar to this for our Cadl-Ranch test projects as we generate a "stubbed" version of the library that has only the public APIs and no implementations. We did this to avoid having a lot of churn whenever changes were made in the generator that would result in implementation details being changed in the test libraries. We could also include the API files as well, but looking at the stubbed libraries is probably a good start.