You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now in the property we get from TCGC in the emitter, we only get a flag flatten to show if this has been flattened by adding the decorator @flatten
We need to flatten the property somewhere and put those flattened properties inside this model.
Currently this happens in the emitter.
With the principal that we need to keep the emitter as simple as possible, we should remove it from the emitter.
Two approaches:
TCGC can do this so that every emitter does not have to do this again.
The emitter just emit out whatever it gets from TCGC, and the generator flattens the property when deserializing the output of emitter.
The text was updated successfully, but these errors were encountered:
ArcturusZhang
changed the title
Move the flatten handling logic out of the emitter to the generator
Move the flatten handling logic to the generator
Jun 6, 2024
Per discussion, we thought we should not flatten properties in emitter, to keep it as simple as possible.
The flattening logic should be implemented in generator.
part of Azure/autorest.csharp#4788
Per discussion, we thought we should not flatten properties in emitter,
to keep it as simple as possible.
The flattening logic should be implemented in generator.
part of Azure/autorest.csharp#4788
---------
Co-authored-by: Mingzhe Huang (from Dev Box) <mingzhehuang@microsoft.com>
Now in the property we get from TCGC in the emitter, we only get a flag
flatten
to show if this has been flattened by adding the decorator@flatten
We need to flatten the property somewhere and put those flattened properties inside this model.
Currently this happens in the emitter.
With the principal that we need to keep the emitter as simple as possible, we should remove it from the emitter.
Two approaches:
The text was updated successfully, but these errors were encountered: