Closed haolingdong-msft closed 1 month ago
Can we now remove the Model/Scalar related types from getName
, as we should be using TCGC names from Model?
https://github.com/Azure/autorest.java/blob/894501332ea54568eb091621f17ffe8895fa57d2/typespec-extension/src/code-model-builder.ts#L2246
We probably still need ModelProperty
and Operation
as they relates to op.
Also, if above is true, we should be able to remove the "template" related code and "empty name" related code as well. https://github.com/Azure/autorest.java/blob/894501332ea54568eb091621f17ffe8895fa57d2/typespec-extension/src/code-model-builder.ts#L2274-L2291
Can we now remove the Model/Scalar related types from
getName
, as we should be using TCGC names from Model?We probably still need
ModelProperty
andOperation
as they relates to op. Also, if above is true, we should be able to remove the "template" related code and "empty name" related code as well.
Thanks for the suggestion. I tried locally, we can remove Scalar
and undefined
, but probabyly cannot remove Model
for now, because there are places that uses Model
type:
Yes, I can do if/else
, just thinking we can get rid of the whole getName
function when integrating with sdkPackage
, so I don't have very strong intention of modifying the logics. But I'm fine of doing this in this pr.
Yes, I can do
if/else
, just thinking we can get rid of the wholegetName
function when integrating withsdkPackage
, so I don't have very strong intention of modifying the logics. But I'm fine of doing this in this pr.
If you can finish the work next week, I am good with "no very strong intention". If you cannot finish next month, it is good incentive for me to clean that up.
The point is this getName
could be vastly simplified, if it does not need to work on Model.
Fix https://github.com/Azure/autorest.java/issues/2731
Code Changes: