Open annelo-msft opened 2 weeks 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.
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 theAzure.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.