autorest.typescript icon indicating copy to clipboard operation
autorest.typescript copied to clipboard

revisit modular models generation in multi clients

Open qiaozha opened this issue 8 months ago • 0 comments

This is the bug from https://github.com/Azure/autorest.typescript/issues/2554 our customers and I have a pr to fix this https://github.com/Azure/autorest.typescript/pull/2556#discussion_r1627958698,the bug is because we didn't add subfolder in the serialize util filepath part, but as getAllModel api doesn't really have a SDKClient parameter, the models are not filtered by clients, what we end up now for multi clients in Modular are just duplicate the models in each sub client's folder, and as serialize and deserialize utils are bind with models, we will have to duplicate that part too right? I think we have three options for this:

  1. keep the way as is now.
  2. to just have one /models subpath export in multi client scenarios, instead of have /subclient/models for each sub client.
  3. ask tcgc to provide api that can filter the models per SDK client, or we can do the filter by ourself, but what about orphan models in this case?

qiaozha avatar Jun 23 '24 01:06 qiaozha