From 193b20a41364563e4e85097e50d6c60bd3633f7a Mon Sep 17 00:00:00 2001 From: Mingzhe Huang Date: Wed, 28 Aug 2024 16:48:35 +0800 Subject: [PATCH] fix(doc): problematic polling operation for lro delete Currently in the offical guide, the same polling operation is shared by all lro operations, which could cause problems for some emitters since the lro metadata contains value which doesn't fit for lro delete. See https://github.com/Azure/autorest.csharp/issues/4827 This commit will create a separate polling operation which fits lro delete. The same definition is already available in https://github.com/Azure/typespec-azure/blob/955fc9534c2f7153d45c9fbe5743baa0c104d803/packages/samples/specs/data-plane/trait-versioning/main.tsp#L72-L77 --- docs/getstarted/azure-core/step06.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/getstarted/azure-core/step06.md b/docs/getstarted/azure-core/step06.md index 4c408c3ab2..4b2b28118c 100644 --- a/docs/getstarted/azure-core/step06.md +++ b/docs/getstarted/azure-core/step06.md @@ -17,9 +17,14 @@ alias ServiceTraits = SupportsRepeatableRequests & alias Operations = Azure.Core.ResourceOperations; interface Widgets { + @sharedRoute @doc("Gets status of a Widget operation.") getWidgetOperationStatus is Operations.GetResourceOperationStatus; + @sharedRoute + @doc("Gets status of a Widget delete operation.") + getWidgetDeleteOperationStatus is Operations.GetResourceOperationStatus; + @doc("Fetch a Widget by name.") getWidget is Operations.ResourceRead; @@ -28,7 +33,7 @@ interface Widgets { createOrUpdateWidget is Operations.LongRunningResourceCreateOrUpdate; @doc("Delete a Widget asynchronously.") - @pollingOperation(Widgets.getWidgetOperationStatus) + @pollingOperation(Widgets.getWidgetDeleteOperationStatus) deleteWidget is Operations.LongRunningResourceDelete; @doc("List Widget resources.")