Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #254 cannot customize response in ARM PUT templates #366

Merged
merged 5 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading