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

fixing missing Retry-After in DeleteLroResponse #410

Merged
merged 4 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
34 changes: 17 additions & 17 deletions docs/libraries/azure-resource-manager/reference/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ model Azure.ResourceManager.ArmAcceptedLroResponse<Description, LroHeaders>
### `ArmAcceptedResponse` {#Azure.ResourceManager.ArmAcceptedResponse}

```typespec
model Azure.ResourceManager.ArmAcceptedResponse<Message>
model Azure.ResourceManager.ArmAcceptedResponse<Message, ExtraHeaders>
```

#### Template Parameters

| Name | Description |
| ------- | ---------------------------------------------------------------------------------- |
| Message | The description of the response status (defaults to `Resource operation accepted`) |
| Name | Description |
| ------------ | ---------------------------------------------------------------------------------- |
| Message | The description of the response status (defaults to `Resource operation accepted`) |
| ExtraHeaders | Additional headers in the response. Default includes Retry-After header |

#### Properties

| Name | Type | Description |
| ----------- | ------- | -------------------------------------------------------------------------------------------------------- |
| statusCode | `202` | The status code. |
| retryAfter? | `int32` | The Retry-After header can indicate how long the client should wait before polling the operation status. |
| Name | Type | Description |
| ---------- | ----- | ---------------- |
| statusCode | `202` | The status code. |

### `ArmAsyncOperationHeader` {#Azure.ResourceManager.ArmAsyncOperationHeader}

Expand Down Expand Up @@ -110,22 +110,22 @@ model Azure.ResourceManager.ArmCombinedLroHeaders<StatusMonitor, FinalResult, Po
The Azure Resource Manager 201 response for a resource

```typespec
model Azure.ResourceManager.ArmCreatedResponse<ResponseBody>
model Azure.ResourceManager.ArmCreatedResponse<ResponseBody, ExtraHeaders>
```

#### Template Parameters

| Name | Description |
| ------------ | --------------------------------- |
| ResponseBody | The contents of the response body |
| Name | Description |
| ------------ | ----------------------------------------------------------------------- |
| ResponseBody | The contents of the response body |
| ExtraHeaders | Additional headers in the response. Default includes Retry-After header |

#### Properties

| Name | Type | Description |
| ----------- | -------------- | -------------------------------------------------------------------------------------------------------- |
| statusCode | `201` | The status code. |
| retryAfter? | `int32` | The Retry-After header can indicate how long the client should wait before polling the operation status. |
| body | `ResponseBody` | The body type of the operation request or response. |
| Name | Type | Description |
| ---------- | -------------- | --------------------------------------------------- |
| statusCode | `201` | The status code. |
| body | `ResponseBody` | The body type of the operation request or response. |

### `ArmDeleteAcceptedLroResponse` {#Azure.ResourceManager.ArmDeleteAcceptedLroResponse}

Expand Down
23 changes: 16 additions & 7 deletions packages/typespec-azure-resource-manager/lib/responses.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ model ArmResponse<ResponseBody> {
/**
* The Azure Resource Manager 201 response for a resource
* @template ResponseBody The contents of the response body
* @template ExtraHeaders Additional headers in the response. Default includes Retry-After header
*/
@doc("Azure create operation completed successfully.")
model ArmCreatedResponse<ResponseBody> {
model ArmCreatedResponse<
ResponseBody,
ExtraHeaders extends TypeSpec.Reflection.Model = Azure.Core.Foundations.RetryAfterHeader
> {
...CreatedResponse;
...Azure.Core.Foundations.RetryAfterHeader;
...ExtraHeaders;
...Body<ResponseBody>;
}

Expand All @@ -39,7 +43,8 @@ model ArmDeletedResponse {
* @dev The response for asynchronous Azure Resource Manager delete ACCEPTED
* @template LroHeaders Optional. Allows overriding the Lro headers returned in the response.
*/
model ArmDeleteAcceptedLroResponse<LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader>
model ArmDeleteAcceptedLroResponse<LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader &
Azure.Core.Foundations.RetryAfterHeader>
is ArmAcceptedLroResponse<"Resource deletion accepted.", LroHeaders>;

/**
Expand All @@ -50,11 +55,15 @@ model ArmDeleteAcceptedResponse is ArmAcceptedResponse<"Resource deletion accept
/**
* @dev The standard ACCEPTED response
* @template Message The description of the response status (defaults to `Resource operation accepted`)
* @template ExtraHeaders Additional headers in the response. Default includes Retry-After header
*/
@doc(Message)
model ArmAcceptedResponse<Message extends valueof string = "Resource operation accepted."> {
model ArmAcceptedResponse<
Message extends valueof string = "Resource operation accepted.",
ExtraHeaders extends TypeSpec.Reflection.Model = Azure.Core.Foundations.RetryAfterHeader
> {
...AcceptedResponse;
...Azure.Core.Foundations.RetryAfterHeader;
...ExtraHeaders;
}

/**
Expand All @@ -65,8 +74,8 @@ model ArmAcceptedResponse<Message extends valueof string = "Resource operation a
@doc(Description)
model ArmAcceptedLroResponse<
Description extends valueof string = "Resource operation accepted.",
LroHeaders extends TypeSpec.Reflection.Model = ArmLroLocationHeader &
Azure.Core.Foundations.RetryAfterHeader
LroHeaders extends TypeSpec.Reflection.Model = Azure.Core.Foundations.RetryAfterHeader &
allenjzhang marked this conversation as resolved.
Show resolved Hide resolved
ArmLroLocationHeader
> {
...AcceptedResponse;
...LroHeaders;
Expand Down
Loading