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

location type should be azureLocation instead of string #1139

Merged
merged 11 commits into from
Jul 15, 2024
7 changes: 7 additions & 0 deletions .chronus/changes/azure-location-2024-6-9-16-54-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

LocationResourceParameter should be azureLocation instead of string
30 changes: 15 additions & 15 deletions docs/libraries/azure-resource-manager/reference/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ model Azure.ResourceManager.ArmLocationResource<BaseType>

#### Properties

| Name | Type | Description |
| -------- | -------- | ----------------------------- |
| location | `string` | The name of the Azure region. |
| Name | Type | Description |
| -------- | -------------------- | ----------------------------- |
| location | `Core.azureLocation` | The name of the Azure region. |

### `ArmLroLocationHeader` {#Azure.ResourceManager.ArmLroLocationHeader}

Expand Down Expand Up @@ -657,9 +657,9 @@ model Azure.ResourceManager.ResourceGroupLocationResource

#### Properties

| Name | Type | Description |
| -------- | -------- | ----------------------------- |
| location | `string` | The name of the Azure region. |
| Name | Type | Description |
| -------- | -------------------- | ----------------------------- |
| location | `Core.azureLocation` | The name of the Azure region. |

### `ResourceInstanceParameters` {#Azure.ResourceManager.ResourceInstanceParameters}

Expand Down Expand Up @@ -851,9 +851,9 @@ model Azure.ResourceManager.SubscriptionLocationResource

#### Properties

| Name | Type | Description |
| -------- | -------- | ----------------------------- |
| location | `string` | The name of the Azure region. |
| Name | Type | Description |
| -------- | -------------------- | ----------------------------- |
| location | `Core.azureLocation` | The name of the Azure region. |

### `TenantLocationResource` {#Azure.ResourceManager.TenantLocationResource}

Expand All @@ -866,9 +866,9 @@ model Azure.ResourceManager.TenantLocationResource

#### Properties

| Name | Type | Description |
| -------- | -------- | ----------------------------- |
| location | `string` | The name of the Azure region. |
| Name | Type | Description |
| -------- | -------------------- | ----------------------------- |
| location | `Core.azureLocation` | The name of the Azure region. |

### `TrackedResource` {#Azure.ResourceManager.TrackedResource}

Expand Down Expand Up @@ -1216,9 +1216,9 @@ model Azure.ResourceManager.CommonTypes.LocationResourceParameter

#### Properties

| Name | Type | Description |
| -------- | -------- | ----------------------------- |
| location | `string` | The name of the Azure region. |
| Name | Type | Description |
| -------- | -------------------- | ----------------------------- |
| location | `Core.azureLocation` | The name of the Azure region. |

### `ManagedServiceIdentity` {#Azure.ResourceManager.CommonTypes.ManagedServiceIdentity}

Expand Down
6 changes: 5 additions & 1 deletion packages/samples/common-types/openapi/v3/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
]
}
},
"Azure.Core.azureLocation": {
"type": "string",
"description": "Represents an Azure geography region where supported resource providers live."
},
"AzureEntityResource": {
"type": "object",
"description": "The resource model definition for an Azure Resource Manager resource with an etag.",
Expand Down Expand Up @@ -275,7 +279,7 @@
"description": "The default location parameter type.",
"properties": {
"location": {
"type": "string",
"$ref": "#/definitions/Azure.Core.azureLocation",
"description": "The name of the Azure region.",
"minLength": 1
}
Expand Down
6 changes: 5 additions & 1 deletion packages/samples/common-types/openapi/v4/types.json
live1206 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
]
}
},
"Azure.Core.azureLocation": {
"type": "string",
"description": "Represents an Azure geography region where supported resource providers live."
},
"AzureEntityResource": {
"type": "object",
"description": "The resource model definition for an Azure Resource Manager resource with an etag.",
Expand Down Expand Up @@ -285,7 +289,7 @@
"description": "The default location parameter type.",
"properties": {
"location": {
"type": "string",
"$ref": "#/definitions/Azure.Core.azureLocation",
"description": "The name of the Azure region.",
"minLength": 1
}
Expand Down
6 changes: 5 additions & 1 deletion packages/samples/common-types/openapi/v5/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
]
}
},
"Azure.Core.azureLocation": {
"type": "string",
"description": "Represents an Azure geography region where supported resource providers live."
},
"AzureEntityResource": {
"type": "object",
"description": "The resource model definition for an Azure Resource Manager resource with an etag.",
Expand Down Expand Up @@ -285,7 +289,7 @@
"description": "The default location parameter type.",
"properties": {
"location": {
"type": "string",
"$ref": "#/definitions/Azure.Core.azureLocation",
"description": "The name of the Azure region.",
"minLength": 1
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ model LocationResourceParameter {
@minLength(1)
@segment("locations")
@key
location: string;
location: azureLocation;
}

/**
Expand Down
Loading