Skip to content

Commit

Permalink
fix(doc): problematic polling operation for lro delete
Browse files Browse the repository at this point in the history
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 Azure/autorest.csharp#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
  • Loading branch information
archerzz committed Aug 28, 2024
1 parent 955fc95 commit 193b20a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/getstarted/azure-core/step06.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ alias ServiceTraits = SupportsRepeatableRequests &
alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;
interface Widgets {
@sharedRoute
@doc("Gets status of a Widget operation.")
getWidgetOperationStatus is Operations.GetResourceOperationStatus<Widget>;
@sharedRoute
@doc("Gets status of a Widget delete operation.")
getWidgetDeleteOperationStatus is Operations.GetResourceOperationStatus<Widget, never>;
@doc("Fetch a Widget by name.")
getWidget is Operations.ResourceRead<Widget>;
Expand All @@ -28,7 +33,7 @@ interface Widgets {
createOrUpdateWidget is Operations.LongRunningResourceCreateOrUpdate<Widget>;
@doc("Delete a Widget asynchronously.")
@pollingOperation(Widgets.getWidgetOperationStatus)
@pollingOperation(Widgets.getWidgetDeleteOperationStatus)
deleteWidget is Operations.LongRunningResourceDelete<Widget>;
@doc("List Widget resources.")
Expand Down

0 comments on commit 193b20a

Please sign in to comment.