Skip to content

Commit

Permalink
Fix for issue #254 cannot customize response in ARM PUT templates (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
markcowl authored Mar 5, 2024
1 parent 5bce1bb commit 8a9ee8a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .chronus/changes/fix-put-templ-2024-2-5-19-5-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

Fix for issue #254 cannot customize response in ARM PUT templates
6 changes: 3 additions & 3 deletions docs/libraries/azure-resource-manager/reference/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ op Azure.ResourceManager.ArmResourceActionAsyncBase(provider: "Microsoft.ThisWil
### `ArmResourceActionNoContentAsync` {#Azure.ResourceManager.ArmResourceActionNoContentAsync}

```typespec
op Azure.ResourceManager.ArmResourceActionNoContentAsync(provider: "Microsoft.ThisWillBeReplaced", body: Request): Azure.ResourceManager.ArmAcceptedLroResponse<"Resource operation accepted.", Azure.ResourceManager.ArmLroLocationHeader<Azure.Core.StatusMonitorPollingOptions<Azure.ResourceManager.ArmOperationStatus<never, Azure.ResourceManager.ResourceProvisioningState>, never, never>, void, string>> | Azure.ResourceManager.ArmNoContentResponse<"Action completed successfully."> | Error
op Azure.ResourceManager.ArmResourceActionNoContentAsync(provider: "Microsoft.ThisWillBeReplaced", body: Request): Azure.ResourceManager.ArmAcceptedLroResponse<Description, LroHeaders> | Azure.ResourceManager.ArmNoContentResponse<"Action completed successfully."> | Error
```

#### Template Parameters
Expand Down Expand Up @@ -792,7 +792,7 @@ op Azure.ResourceManager.ArmResourceCheckExistence(provider: "Microsoft.ThisWill
### `ArmResourceCreateOrReplaceAsync` {#Azure.ResourceManager.ArmResourceCreateOrReplaceAsync}

```typespec
op Azure.ResourceManager.ArmResourceCreateOrReplaceAsync(provider: "Microsoft.ThisWillBeReplaced", resource: Resource): Azure.ResourceManager.ArmResourceUpdatedResponse<Resource> | Azure.ResourceManager.ArmResourceCreatedResponse<Resource, LroHeaders> | Error
op Azure.ResourceManager.ArmResourceCreateOrReplaceAsync(provider: "Microsoft.ThisWillBeReplaced", resource: Resource): Response | Error
```

#### Template Parameters
Expand Down Expand Up @@ -829,7 +829,7 @@ op Azure.ResourceManager.ArmResourceCreateOrReplaceSync(provider: "Microsoft.Thi
A long-running resource CreateOrUpdate (PUT)

```typespec
op Azure.ResourceManager.ArmResourceCreateOrUpdateAsync(provider: "Microsoft.ThisWillBeReplaced", resource: Resource): Azure.ResourceManager.ArmResourceUpdatedResponse<Resource> | Azure.ResourceManager.ArmResourceCreatedResponse<Resource, LroHeaders> | Error
op Azure.ResourceManager.ArmResourceCreateOrUpdateAsync(provider: "Microsoft.ThisWillBeReplaced", resource: Resource): Response | Error
```

#### Template Parameters
Expand Down
13 changes: 6 additions & 7 deletions packages/typespec-azure-resource-manager/lib/operations.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ op ArmResourceCreateOrUpdateAsync<
> is ArmCreateOperation<
ResourceInstanceParameters<Resource, BaseParameters> & Parameters,
Resource,
ArmResourceUpdatedResponse<Resource> | ArmResourceCreatedResponse<Resource, LroHeaders>,
Response,
Error
>;

Expand Down Expand Up @@ -592,17 +592,16 @@ op ArmResourceActionNoContentAsync<
Resource extends ArmResource,
Request extends TypeSpec.Reflection.Model | void,
BaseParameters extends TypeSpec.Reflection.Model = DefaultBaseParameters<Resource>,
LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader<
Azure.Core.StatusMonitorPollingOptions<ArmOperationStatus>,
void,
string
>,
LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader,
Parameters extends {} = {},
Error extends {} = ErrorResponse
> is ArmResourceActionAsyncBase<
Resource,
Request,
ArmAcceptedLroResponse | ArmNoContentResponse<"Action completed successfully.">,
ArmAcceptedLroResponse<
"Resource operation accepted.",
LroHeaders
> | ArmNoContentResponse<"Action completed successfully.">,
BaseParameters,
Parameters,
Error
Expand Down

0 comments on commit 8a9ee8a

Please sign in to comment.