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
Hi,
I have the following signature:
public async Task RefreshAsset(
CancellationToken cancellationToken,
[FromRoute] string assetlabel,
[FromQuery] string name = null,
[FromQuery] string schema = null)
I use the autorest command line with flags:
autorest --input-file=swagger.json --csharp --namespace=AssetRestApi.Client --add-credentials --verbose
The result as C# code is:
public virtual async Task RefreshAssetAsync(string assetlabel, string name, string schema, string xApiVersion, string xApiVersion1, RequestContext context)
Couple of questions:
what do I need to use as a flag to keep the name and schmea with value null by default? I would like my clients to use the short version in some instances
in the previous version of Autorest I had this: string xApiVersion = null, string xApiVersion1 = null, RequestContext context = null, and now I need to send explicit 'null'
I noticed the order of the parameters: Uri endpoint, TokenCredential credential is the new one, theybeing flipped since last version.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have the following signature:
public async Task RefreshAsset(
CancellationToken cancellationToken,
[FromRoute] string assetlabel,
[FromQuery] string name = null,
[FromQuery] string schema = null)
I use the autorest command line with flags:
autorest --input-file=swagger.json --csharp --namespace=AssetRestApi.Client --add-credentials --verbose
The result as C# code is:
public virtual async Task RefreshAssetAsync(string assetlabel, string name, string schema, string xApiVersion, string xApiVersion1, RequestContext context)
Couple of questions:
Appreciate your answer,
Mihai
Beta Was this translation helpful? Give feedback.
All reactions