Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Initial analysis and test baseline for GenerateAndBuildLib.ps1 emitte…
…r support

Co-authored-by: JoshLove-msft <[email protected]>
  • Loading branch information
Copilot and JoshLove-msft committed Sep 16, 2025
commit d4909644f9665dc580d1f4ba1ef819a7e2e0c6e1
16 changes: 16 additions & 0 deletions eng/scripts/automation/test/autorest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated code configuration

Run `dotnet build /t:GenerateCode` to generate code.

```yaml
title: AzurePurviewAdministration
require:
- https://github.com/Azure/azure-rest-api-specs/specification/purview/data-plane/readme.md
namespace: Azure.Analytics.Purview.Administration
modelerfour:
lenient-model-deduplication: true
security: AADToken
security-scopes: https://purview.azure.net/.default
```


Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -199,29 +199,29 @@ Console.WriteLine(result.GetProperty("scanDetails").ToString());
Console.WriteLine(result.GetProperty("properties").GetProperty("<key>").ToString());
]]></code></example>
</member>
<member name="GetOperationStatusAsync(string,ETag?,RequestContext)">
<member name="GetOperationAsync(string,ETag?,RequestContext)">
<example>
This sample shows how to call GetOperationStatusAsync and parse the result.
This sample shows how to call GetOperationAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "<InstanceId>", credential);

Response response = await client.GetOperationStatusAsync("<operationId>");
Response response = await client.GetOperationAsync("<operationId>");

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("lastActionDateTime").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
]]></code>
This sample shows how to call GetOperationStatusAsync with all parameters and parse the result.
This sample shows how to call GetOperationAsync with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "<InstanceId>", credential);

Response response = await client.GetOperationStatusAsync("<operationId>", ifNoneMatch: new ETag("<ifNoneMatch>"));
Response response = await client.GetOperationAsync("<operationId>", ifNoneMatch: new ETag("<ifNoneMatch>"));

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Expand All @@ -245,29 +245,29 @@ Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("etag").ToString());
]]></code></example>
</member>
<member name="GetOperationStatus(string,ETag?,RequestContext)">
<member name="GetOperation(string,ETag?,RequestContext)">
<example>
This sample shows how to call GetOperationStatus and parse the result.
This sample shows how to call GetOperation and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "<InstanceId>", credential);

Response response = client.GetOperationStatus("<operationId>");
Response response = client.GetOperation("<operationId>");

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("lastActionDateTime").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
]]></code>
This sample shows how to call GetOperationStatus with all parameters and parse the result.
This sample shows how to call GetOperation with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "<InstanceId>", credential);

Response response = client.GetOperationStatus("<operationId>", ifNoneMatch: new ETag("<ifNoneMatch>"));
Response response = client.GetOperation("<operationId>", ifNoneMatch: new ETag("<ifNoneMatch>"));

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Expand Down Expand Up @@ -621,15 +621,15 @@ foreach (BinaryData item in client.GetFiles("<provider>", "<name>", "<version>")
}
]]></code></example>
</member>
<member name="GetOperationStatusesAsync(string,int?,RequestContext)">
<member name="GetOperationsAsync(string,int?,RequestContext)">
<example>
This sample shows how to call GetOperationStatusesAsync and parse the result.
This sample shows how to call GetOperationsAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "<InstanceId>", credential);

await foreach (BinaryData item in client.GetOperationStatusesAsync())
await foreach (BinaryData item in client.GetOperationsAsync())
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Expand All @@ -638,13 +638,13 @@ await foreach (BinaryData item in client.GetOperationStatusesAsync())
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
}
]]></code>
This sample shows how to call GetOperationStatusesAsync with all parameters and parse the result.
This sample shows how to call GetOperationsAsync with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "<InstanceId>", credential);

await foreach (BinaryData item in client.GetOperationStatusesAsync(filter: "<filter>", top: 1234))
await foreach (BinaryData item in client.GetOperationsAsync(filter: "<filter>", top: 1234))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Expand All @@ -669,15 +669,15 @@ await foreach (BinaryData item in client.GetOperationStatusesAsync(filter: "<fil
}
]]></code></example>
</member>
<member name="GetOperationStatuses(string,int?,RequestContext)">
<member name="GetOperations(string,int?,RequestContext)">
<example>
This sample shows how to call GetOperationStatuses and parse the result.
This sample shows how to call GetOperations and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "<InstanceId>", credential);

foreach (BinaryData item in client.GetOperationStatuses())
foreach (BinaryData item in client.GetOperations())
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Expand All @@ -686,13 +686,13 @@ foreach (BinaryData item in client.GetOperationStatuses())
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
}
]]></code>
This sample shows how to call GetOperationStatuses with all parameters and parse the result.
This sample shows how to call GetOperations with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
DeviceUpdateClient client = new DeviceUpdateClient(endpoint, "<InstanceId>", credential);

foreach (BinaryData item in client.GetOperationStatuses(filter: "<filter>", top: 1234))
foreach (BinaryData item in client.GetOperations(filter: "<filter>", top: 1234))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion sdk/deviceupdate/Azure.IoT.DeviceUpdate/src/autorest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Run `generate.ps1` or `dotnet msbuild /t:GenerateCode` to generate code.
public-clients: true
title: DeviceUpdate

input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d7c9be23749467be1aea18f02ba2f4948a39db6a/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/stable/2022-10-01/deviceupdate.json
require:
- https://github.com/Azure/azure-rest-api-specs/blob/5ee062ac3cc2df298ff47bdfc7792d257fd85bb8/specification/deviceupdate/data-plane/readme.md


namespace: Azure.IoT.DeviceUpdate
security: AADToken
Expand Down Expand Up @@ -69,3 +71,4 @@ directive:
delete $["/deviceUpdate/{instanceId}/updates:import"];
return $;
```

Loading
Loading