microsoft / typespec

https://typespec.io/
MIT License
4.46k stars 209 forks source link

Support rename model with custom code #4256

Closed m-nash closed 1 month ago

m-nash commented 2 months ago

Support https://github.com/Azure/autorest.csharp/blob/feature/v3/readme.md#rename-a-model-class

ArcturusZhang commented 2 months ago

I only supported CodeGenType, which is quite universal that could the name and namespace of any generated type. Do we still need the CodeGenModel attribute? Maybe we could remove it. The extra feature in the CodeGenModel attribute is that it could change or append usage to the model.