Skip to content

Commit

Permalink
Merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeguerin committed Jun 13, 2024
2 parents e2e30ab + 70ffbbc commit 233f3dd
Show file tree
Hide file tree
Showing 93 changed files with 4,048 additions and 606 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

Adding legacy v4 ManagedServiceIdentity model to avoid breaking changes in specs with mixed v3 and v4 common type reference
7 changes: 7 additions & 0 deletions .chronus/changes/arm-lro-opt-2024-5-5-15-31-47.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: feature
packages:
- "@azure-tools/typespec-azure-core"
---

Add override decorator @useFinalStateVia for lro resolution when multiple resolution pathways exist
7 changes: 7 additions & 0 deletions .chronus/changes/arm-lro-opt-2024-5-5-15-33-29.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

Remove OpenAPI dependencies from ARM LRO templates and test LRO overrides
7 changes: 7 additions & 0 deletions .chronus/changes/arm-lro-opt-2024-5-5-19-32-9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: feature
packages:
- "@azure-tools/typespec-autorest"
---

Add suppress-lro-options emitter option to control emission of x-ms-long-running-operation-options
9 changes: 9 additions & 0 deletions .chronus/changes/arm-lro-opt-2024-5-5-2-57-50.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: feature
packages:
- "@azure-tools/typespec-autorest"

---

- Add support for displaying lro options in typespec-autorest based on lro metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

Adding an overload parameter to ResourceNameParameter that allows `name` type to be set to string union type.
8 changes: 8 additions & 0 deletions .chronus/changes/res-vis-2024-5-12-4-34-46.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"
---

Make Resource Properties Bag Updatable
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@azure-tools/typespec-autorest-canonical"
---

update the canonical swagger file folder name
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Output file will interpolate the following values:
- service-name: Name of the service if multiple
- azure-resource-provider-folder: Value of the azure-resource-provider-folder option

Default: `{azure-resource-provider-folder}/{service-name}/{version}/openapi.json`
Default: `{azure-resource-provider-folder}/{service-name}/canonical/openapi.json`

Example: Single service

Expand Down
6 changes: 6 additions & 0 deletions docs/emitters/typespec-autorest/reference/emitter.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,9 @@ This extension is meant for debugging and should not be depended on.
**Type:** `boolean`

Create read-only property schema for lro status

### `emit-lro-options`

**Type:** `"none" | "final-state-only" | "all"`

Determine whether and how to emit x-ms-long-running-operation-options for lro resolution
12 changes: 6 additions & 6 deletions docs/libraries/azure-core/reference/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ model Azure.Core.ResourceOperationStatus<Resource, StatusResult, StatusError>

#### Properties

| Name | Type | Description |
| ------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- |
| id | `string` | The unique ID of the operation. |
| status | [`OperationState`](./data-types.md#Azure.Core.Foundations.OperationState) | The status of the operation |
| error? | `StatusError` | Error object that describes the error when status is "Failed". |
| result? | `StatusResult` | The result of the operation. |
| Name | Type | Description |
| ------- | ------------------------------------------------------------------------- | ----------- |
| id | `string` | |
| status | [`OperationState`](./data-types.md#Azure.Core.Foundations.OperationState) | |
| error? | `StatusError` | |
| result? | `StatusResult` | |

### `ResponseProperty` {#Azure.Core.ResponseProperty}

Expand Down
18 changes: 18 additions & 0 deletions docs/libraries/azure-core/reference/decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,24 @@ Used to define how to call custom polling operations for long-running operations
| --------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| targetParameter | `ModelProperty \| string` | A reference to the polling operation parameter this parameter<br />provides a value for, or the name of that parameter. The default value is the name of<br />the decorated parameter or property. |

### `@useFinalStateVia` {#@Azure.Core.useFinalStateVia}

Overrides the final state value for an operation

```typespec
@Azure.Core.useFinalStateVia(finalState: valueof "original-uri" | "operation-location" | "location" | "azure-async-operation")
```

#### Target

`Operation`

#### Parameters

| Name | Type | Description |
| ---------- | ----------------------------------------------------------------------------------------- | ----------------------------- |
| finalState | `valueof "original-uri" \| "operation-location" \| "location" \| "azure-async-operation"` | The desired final state value |

## Azure.Core.Foundations

### `@omitKeyProperties` {#@Azure.Core.Foundations.omitKeyProperties}
Expand Down
1 change: 1 addition & 0 deletions docs/libraries/azure-core/reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ npm install --save-peer @azure-tools/typespec-azure-core
- [`@pollingLocation`](./decorators.md#@Azure.Core.pollingLocation)
- [`@pollingOperation`](./decorators.md#@Azure.Core.pollingOperation)
- [`@pollingOperationParameter`](./decorators.md#@Azure.Core.pollingOperationParameter)
- [`@useFinalStateVia`](./decorators.md#@Azure.Core.useFinalStateVia)

### Interfaces

Expand Down
4 changes: 2 additions & 2 deletions docs/libraries/azure-core/reference/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ op Azure.Core.ResourceOperations.LongRunningResourceCollectionAction(apiVersion:
Resource operation status operation template.

```typespec
op Azure.Core.ResourceOperations.GetResourceOperationStatus(apiVersion: string, operationId: string): Azure.Core.ResourceOperationStatus<Resource, StatusResult, StatusError> | ErrorResponse
op Azure.Core.ResourceOperations.GetResourceOperationStatus(apiVersion: string): Azure.Core.ResourceOperationStatus<Resource, StatusResult, StatusError> | ErrorResponse
```

##### Template Parameters
Expand All @@ -280,7 +280,7 @@ op Azure.Core.ResourceOperations.GetResourceOperationStatus(apiVersion: string,
Operation signature to retrieve a resource operation status.

```typespec
op Azure.Core.GetResourceOperationStatus(apiVersion: string, operationId: string): Azure.Core.ResourceOperationStatus<Resource, StatusResult, StatusError> | Azure.Core.Foundations.ErrorResponse
op Azure.Core.GetResourceOperationStatus(apiVersion: string): Azure.Core.ResourceOperationStatus<Resource, StatusResult, StatusError> | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand Down
Loading

0 comments on commit 233f3dd

Please sign in to comment.