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
We want the ability in client.tsp to override a generated client method. When we switch to ... always meaning spread, we will also need the ability to generate options bags for languages that prefer options bags. Adding a decorator like overrideClientMethod will allow authors to clearly state their preferred signature for specific language(s). This will also allow patched customizations without having to craft an entire client to modify one operation
// main.tsp
namespace MyService;
model Params = {
foo: string;
bar: string;
}
op myOperation(...Params): void;
// client.tsp
namespace MyCustomizations;
op myOperationCustomization(@bodyRoot params: Params): void;
@@overrideClientMethod(MyService.myOperation, MyCustomizations.myOperationCustomization);
Check that this issue is about the Azure libraries for typespec. For feature request in the typespec language or core libraries file it in the TypeSpec repo
Do we discard the serviceOperation design? It is kind of opposite to this design @serviceOperation(serviceOp) clientOp where here @overrideClientMethod(clientOp) serviceOp
Should we recommend dev to use ref to property (Timothee kind of recommend this)? E.g.
modelParams={foo: MyService.myOperationModel.foo;
bar: MyService.myOperationModel.bar;}
Clear and concise description of the problem
We want the ability in
client.tsp
to override a generated client method. When we switch to...
always meaning spread, we will also need the ability to generate options bags for languages that prefer options bags. Adding a decorator likeoverrideClientMethod
will allow authors to clearly state their preferred signature for specific language(s). This will also allow patched customizations without having to craft an entire client to modify one operationChecklist
The text was updated successfully, but these errors were encountered: