Extension for AutoRest (https://github.com/Azure/autorest) that generates TypeScript code. The transpiled javascript code is isomorphic. It can be run in browser and in node.js environment.
MIT License
179
stars
75
forks
source link
Respect client level parameter in api client factory function #2809
Currently, if we have client level lifted parameter, our interface would be like
Modular client constructor
export class NetworkAnalyticsClient {
constructor(
credential: TokenCredential,
subscriptionId: string, // // subscriptionId will be used in buildOperationGroups or buildOperation.
options: NetworkAnalyticsClientOptionalParams = {},
) {}
}
In api layer, we didn't provide it as part of the client factory signature, this is inconsistent between the modular client layer and api layer, which makes sense before, because we were just importing NetworkAnalyticsContext from the rest api, and this doesn't make sense to RLC layer, but since we have decoupled the rlc library from Modular and generating our own context in modular, the consistency between modular client layer and api layer is something we could consider.
Currently, if we have client level lifted parameter, our interface would be like Modular client constructor
API layer client factory functions
In api layer, we didn't provide it as part of the client factory signature, this is inconsistent between the modular client layer and api layer, which makes sense before, because we were just importing NetworkAnalyticsContext from the rest api, and this doesn't make sense to RLC layer, but since we have decoupled the rlc library from Modular and generating our own context in modular, the consistency between modular client layer and api layer is something we could consider.