Skip to content

Commit 1bb4dc0

Browse files
authored
Add missing Grafana_Update LRO header to Microsoft.Dashboard 2024-11-01-preview and update TypeSpec spec (Azure#35849)
* add missing lro header + change tsp to async * run tsp compile . for swagger
1 parent a2a0bcd commit 1bb4dc0

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

specification/dashboard/Dashboard.Management/ManagedGrafana.tsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ interface ManagedGrafanas {
6464
#suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
6565
@patch(#{ implicitOptionality: false })
6666
@operationId("Grafana_Update")
67-
update is ArmCustomPatchSync<
67+
update is ArmCustomPatchAsync<
6868
ManagedGrafana,
6969
PatchModel = ManagedGrafanaUpdateParameters,
70-
Response = ArmResponse<ManagedGrafana> | (AcceptedResponse & {
70+
Response = ArmResponse<ManagedGrafana> | (ArmAcceptedLroResponse<LroHeaders = ArmAsyncOperationHeader<FinalResult = ManagedGrafana> &
71+
Azure.Core.Foundations.RetryAfterHeader> & {
7172
@bodyRoot
7273
_: ManagedGrafana;
7374
})

specification/dashboard/resource-manager/Microsoft.Dashboard/preview/2024-11-01-preview/grafana.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,17 @@
647647
"description": "The request has been accepted for processing, but processing has not yet completed.",
648648
"schema": {
649649
"$ref": "#/definitions/ManagedGrafana"
650+
},
651+
"headers": {
652+
"Azure-AsyncOperation": {
653+
"type": "string",
654+
"description": "A link to the status monitor"
655+
},
656+
"Retry-After": {
657+
"type": "integer",
658+
"format": "int32",
659+
"description": "The Retry-After header can indicate how long the client should wait before polling the operation status."
660+
}
650661
}
651662
},
652663
"default": {
@@ -660,7 +671,11 @@
660671
"Grafana_Update": {
661672
"$ref": "./examples/Grafana_Update.json"
662673
}
663-
}
674+
},
675+
"x-ms-long-running-operation-options": {
676+
"final-state-via": "azure-async-operation"
677+
},
678+
"x-ms-long-running-operation": true
664679
},
665680
"delete": {
666681
"operationId": "Grafana_Delete",

0 commit comments

Comments
 (0)