Open kazrael2119 opened 1 month ago
In this issue, the client name we used in readme.md should come from Modular layer, however what we are using is the RLC client name. The root cause is currently we put the package.json readme.md generation into the rlc-common library, and we are leveraging the RLCModel to get all the information we need. See details from here
we could have three options to resolve this.
Option 1: we add the modularClientName in RLCModel and set this value in buildCodeModel emitClients
Pros:
Cons:
Option 2: it doesn't really quite make sense to put the Modular metadata generation into rlc-common library. we could split the modular metadata generation out from rlc-common, and we could try to pass modular model to buildMetadata.
Pros:
Cons:
Option 3: we could change the Modular model interface to link it with RLC model. and try to pass modular model to createMetadata.
Pros:
Cons:
Personally, I prefer option 3, because
https://github.com/Azure/autorest.typescript/pull/2697/files#diff-f204b0d6971e33587c7caa3083ebbd3d65060ab2bc38a140336a94b519c3c4e3R7 set client name in client.tsp but this client name doesn't work in readme.md https://github.com/Azure/autorest.typescript/pull/2697/files#diff-9c8451c7dabaf8ee5e1ccc587fdae3ee0d7df8bb7a49efdfe9d59aa42abc2ee4R31