Now, we only keep the "library name" of a type as the name field in the TCGC's result.
But we might need to keep the original name (we could call it tspName in parallel of tspNamespace which should be intuitive).
Imagine this scenario:
we have a type in azure.core template, such as:
namespace Azure.Core;
model ResponseError {}
And when it is used in an RP's spec, a decorator could be added to it via client.tsp:
Now, we only keep the "library name" of a type as the
name
field in the TCGC's result. But we might need to keep the original name (we could call ittspName
in parallel oftspNamespace
which should be intuitive).Imagine this scenario: we have a type in azure.core template, such as:
And when it is used in an RP's spec, a decorator could be added to it via client.tsp:
Now the model returned in TCGC for this ResponseError will be:
The generator now only knows that this model is defined in Azure.Core namespace, but it loses track of which model this is because of the name change.
Therefore we might need another field to track its original name for all types.