Skip to content

Commit 95f9545

Browse files
client.tsp
1 parent 68accb2 commit 95f9545

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
import "@typespec/http";
3+
import "./main.tsp";
4+
5+
using Azure.ClientGenerator.Core;
6+
using TypeSpec.Http;
7+
using Microsoft.Compute;
8+
9+
@@alternateType(ContentTypeResponseHeader.contentType, "application/json", "java");

specification/compute/Compute.Management/routes.tsp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,7 @@ interface VirtualMachineRunCommandsOperationGroup {
598598
@action("runCommands")
599599
@list
600600
list is ComputeProviderActionSync<
601-
Response = RunCommandListResult & {
602-
#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union"
603-
@header
604-
contentType: "application/json" | "text/json";
605-
},
601+
Response = RunCommandListResult & ContentTypeResponseHeader,
606602
Scope = SubscriptionActionScope,
607603
Parameters = LocationParameter
608604
>;
@@ -624,13 +620,15 @@ interface VirtualMachineRunCommandsOperationGroup {
624620
commandId: string,
625621

626622
...SubscriptionIdParameter,
627-
): ArmResponse<RunCommandDocument & {
628-
#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union"
629-
@header
630-
contentType: "application/json" | "text/json";
631-
}> | CloudError;
623+
): ArmResponse<RunCommandDocument & ContentTypeResponseHeader> | CloudError;
632624
}
633625

634626
@@doc(LogAnalyticsOperationGroup.exportRequestRateByInterval::parameters.body,
635627
"Parameters supplied to the LogAnalytics getRequestRateByInterval Api."
636628
);
629+
630+
alias ContentTypeResponseHeader = {
631+
#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union"
632+
@header
633+
contentType: "application/json" | "text/json";
634+
};

0 commit comments

Comments
 (0)