Skip to content

Commit 3d12e5d

Browse files
markcowlCopilot
andauthored
Fix devcenter (#44340)
* Regenerate OpenAPI for DevCenter and Maps after removing armCommonDefinition The @armCommonDefinition decorators for CustomerManagedKeyEncryption and Encryption types have been removed in the typespec-azure-resource-manager package. Add clientName decorators to strip namespace qualification from emitted type names. Rename local DevCenter KeyEncryptionKeyIdentity model to KeyEncryptionKeyIdentityUpdate to avoid name clash. Depends on: Azure/typespec-azure#4627 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Avoid incompatible types for existing clients * Erase changes from existing sdks * Completely remove additional renames from existing clients * old package lock * Updating version for fix --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a9aeac6 commit 3d12e5d

10 files changed

Lines changed: 377 additions & 28 deletions

File tree

package-lock.json

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@azure-tools/typespec-autorest": "0.69.1",
1010
"@azure-tools/typespec-azure-core": "0.69.0",
1111
"@azure-tools/typespec-azure-portal-core": "0.69.0",
12-
"@azure-tools/typespec-azure-resource-manager": "0.69.1",
12+
"@azure-tools/typespec-azure-resource-manager": "0.69.2",
1313
"@azure-tools/typespec-azure-rulesets": "0.69.1",
1414
"@azure-tools/typespec-client-generator-cli": "0.33.1",
1515
"@azure-tools/typespec-client-generator-core": "0.69.0",

specification/devcenter/DevCenter.Management/back-compatible.tsp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ import "@azure-tools/typespec-azure-resource-manager";
44
using Azure.ClientGenerator.Core;
55
using Microsoft.DevCenter;
66

7+
// Remove namespace qualification from CommonTypes encryption types for OpenAPI compatibility
8+
@@clientName(
9+
Azure.ResourceManager.CommonTypes.CustomerManagedKeyEncryption,
10+
"CustomerManagedKeyEncryption",
11+
"!csharp,!java,!go"
12+
);
13+
@@clientName(
14+
Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentity,
15+
"KeyEncryptionKeyIdentity",
16+
"!csharp,!java,!go"
17+
);
18+
@@clientName(
19+
Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentityType,
20+
"KeyEncryptionKeyIdentityType",
21+
"!csharp,!java,!go"
22+
);
23+
@@clientName(Azure.Core.uuid, "uuid", "!csharp,!java,!go");
24+
725
@@clientName(DevCenters.createOrUpdate::parameters.resource, "body");
826
@@clientName(DevCenters.update::parameters.properties, "body");
927
@@clientLocation(DevCenters.listByDevCenter, Images);

specification/devcenter/DevCenter.Management/client.tsp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,17 @@ using Microsoft.DevCenter;
2727
);
2828

2929
@@clientName(
30-
Microsoft.DevCenter.KeyEncryptionKeyIdentity,
30+
Microsoft.DevCenter.KeyEncryptionKeyIdentityUpdate,
3131
"DevCenterKeyEncryptionKeyIdentity",
3232
"csharp"
3333
);
3434

35+
@@clientName(
36+
Microsoft.DevCenter.KeyEncryptionKeyIdentityUpdate,
37+
"KeyEncryptionKeyIdentity",
38+
"java,go"
39+
);
40+
3541
@@clientName(
3642
Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentityType,
3743
"IdentityType",

specification/devcenter/DevCenter.Management/models.tsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,11 +771,11 @@ model DevCenterEncryptionSetUpdateProperties {
771771
keyEncryptionKeyUrl?: url;
772772

773773
@doc("The managed identity configuration used for key vault access.")
774-
keyEncryptionKeyIdentity?: KeyEncryptionKeyIdentity;
774+
keyEncryptionKeyIdentity?: KeyEncryptionKeyIdentityUpdate;
775775
}
776776

777777
@doc("The managed identity configuration used for key vault access.")
778-
model KeyEncryptionKeyIdentity {
778+
model KeyEncryptionKeyIdentityUpdate {
779779
@doc("The type of managed identity to use for key vault access.")
780780
type?: CmkIdentityType;
781781

specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/DevCenterRP.json

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9427,6 +9427,20 @@
94279427
]
94289428
}
94299429
},
9430+
"CustomerManagedKeyEncryption": {
9431+
"type": "object",
9432+
"description": "Customer-managed key encryption properties for the resource.",
9433+
"properties": {
9434+
"keyEncryptionKeyIdentity": {
9435+
"$ref": "#/definitions/KeyEncryptionKeyIdentity",
9436+
"description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault."
9437+
},
9438+
"keyEncryptionKeyUrl": {
9439+
"type": "string",
9440+
"description": "key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek."
9441+
}
9442+
}
9443+
},
94309444
"CustomizationTask": {
94319445
"type": "object",
94329446
"description": "Represents a Task to be used in customizing a Dev Box.",
@@ -9919,7 +9933,7 @@
99199933
"description": "Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek."
99209934
},
99219935
"keyEncryptionKeyIdentity": {
9922-
"$ref": "#/definitions/KeyEncryptionKeyIdentity",
9936+
"$ref": "#/definitions/KeyEncryptionKeyIdentityUpdate",
99239937
"description": "The managed identity configuration used for key vault access."
99249938
}
99259939
}
@@ -10170,7 +10184,7 @@
1017010184
"description": "Encryption properties.",
1017110185
"properties": {
1017210186
"customerManagedKeyEncryption": {
10173-
"$ref": "../../../../../common-types/resource-management/v4/customermanagedkeys.json#/definitions/customerManagedKeyEncryption",
10187+
"$ref": "#/definitions/CustomerManagedKeyEncryption",
1017410188
"description": "All Customer-managed key encryption properties for the resource."
1017510189
}
1017610190
}
@@ -11527,6 +11541,55 @@
1152711541
}
1152811542
},
1152911543
"KeyEncryptionKeyIdentity": {
11544+
"type": "object",
11545+
"description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.",
11546+
"properties": {
11547+
"identityType": {
11548+
"$ref": "#/definitions/KeyEncryptionKeyIdentityType",
11549+
"description": "The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity."
11550+
},
11551+
"userAssignedIdentityResourceId": {
11552+
"type": "string",
11553+
"format": "arm-id",
11554+
"description": "User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity."
11555+
},
11556+
"delegatedIdentityClientId": {
11557+
"$ref": "#/definitions/uuid",
11558+
"description": "delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only."
11559+
}
11560+
}
11561+
},
11562+
"KeyEncryptionKeyIdentityType": {
11563+
"type": "string",
11564+
"description": "The type of identity to use.",
11565+
"enum": [
11566+
"systemAssignedIdentity",
11567+
"userAssignedIdentity",
11568+
"delegatedResourceIdentity"
11569+
],
11570+
"x-ms-enum": {
11571+
"name": "KeyEncryptionKeyIdentityType",
11572+
"modelAsString": true,
11573+
"values": [
11574+
{
11575+
"name": "SystemAssignedIdentity",
11576+
"value": "systemAssignedIdentity",
11577+
"description": "System assigned identity"
11578+
},
11579+
{
11580+
"name": "UserAssignedIdentity",
11581+
"value": "userAssignedIdentity",
11582+
"description": "User assigned identity"
11583+
},
11584+
{
11585+
"name": "DelegatedResourceIdentity",
11586+
"value": "delegatedResourceIdentity",
11587+
"description": "Delegated identity"
11588+
}
11589+
]
11590+
}
11591+
},
11592+
"KeyEncryptionKeyIdentityUpdate": {
1153011593
"type": "object",
1153111594
"description": "The managed identity configuration used for key vault access.",
1153211595
"properties": {
@@ -13329,6 +13392,11 @@
1332913392
"description": "Indicates whether workspace storage is enabled."
1333013393
}
1333113394
}
13395+
},
13396+
"uuid": {
13397+
"type": "string",
13398+
"format": "uuid",
13399+
"description": "Universally Unique Identifier"
1333213400
}
1333313401
},
1333413402
"parameters": {}

specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-10-01-preview/DevCenterRP.json

Lines changed: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8863,7 +8863,7 @@
88638863
"description": "Represents an Entra group assigned to this Project, entitling all members to resources for the given scope.",
88648864
"properties": {
88658865
"objectId": {
8866-
"$ref": "#/definitions/Azure.Core.uuid",
8866+
"$ref": "#/definitions/uuid",
88678867
"description": "The Entra group object ID (GUID)."
88688868
},
88698869
"scope": {
@@ -9010,11 +9010,6 @@
90109010
]
90119011
}
90129012
},
9013-
"Azure.Core.uuid": {
9014-
"type": "string",
9015-
"format": "uuid",
9016-
"description": "Universally Unique Identifier"
9017-
},
90189013
"AzureAiServicesMode": {
90199014
"type": "string",
90209015
"description": "Indicates whether Azure AI services are enabled for a project.",
@@ -9558,6 +9553,20 @@
95589553
}
95599554
}
95609555
},
9556+
"CustomerManagedKeyEncryption": {
9557+
"type": "object",
9558+
"description": "Customer-managed key encryption properties for the resource.",
9559+
"properties": {
9560+
"keyEncryptionKeyIdentity": {
9561+
"$ref": "#/definitions/KeyEncryptionKeyIdentity",
9562+
"description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault."
9563+
},
9564+
"keyEncryptionKeyUrl": {
9565+
"type": "string",
9566+
"description": "key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek."
9567+
}
9568+
}
9569+
},
95619570
"CustomizationTask": {
95629571
"type": "object",
95639572
"description": "Represents a Task to be used in customizing a Dev Box.",
@@ -10070,7 +10079,7 @@
1007010079
"description": "Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek."
1007110080
},
1007210081
"keyEncryptionKeyIdentity": {
10073-
"$ref": "#/definitions/KeyEncryptionKeyIdentity",
10082+
"$ref": "#/definitions/KeyEncryptionKeyIdentityUpdate",
1007410083
"description": "The managed identity configuration used for key vault access."
1007510084
}
1007610085
}
@@ -10321,7 +10330,7 @@
1032110330
"description": "Encryption properties.",
1032210331
"properties": {
1032310332
"customerManagedKeyEncryption": {
10324-
"$ref": "../../../../../common-types/resource-management/v4/customermanagedkeys.json#/definitions/customerManagedKeyEncryption",
10333+
"$ref": "#/definitions/CustomerManagedKeyEncryption",
1032510334
"description": "All Customer-managed key encryption properties for the resource."
1032610335
}
1032710336
}
@@ -11826,6 +11835,55 @@
1182611835
}
1182711836
},
1182811837
"KeyEncryptionKeyIdentity": {
11838+
"type": "object",
11839+
"description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.",
11840+
"properties": {
11841+
"identityType": {
11842+
"$ref": "#/definitions/KeyEncryptionKeyIdentityType",
11843+
"description": "The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity."
11844+
},
11845+
"userAssignedIdentityResourceId": {
11846+
"type": "string",
11847+
"format": "arm-id",
11848+
"description": "User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity."
11849+
},
11850+
"delegatedIdentityClientId": {
11851+
"$ref": "#/definitions/uuid",
11852+
"description": "delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only."
11853+
}
11854+
}
11855+
},
11856+
"KeyEncryptionKeyIdentityType": {
11857+
"type": "string",
11858+
"description": "The type of identity to use.",
11859+
"enum": [
11860+
"systemAssignedIdentity",
11861+
"userAssignedIdentity",
11862+
"delegatedResourceIdentity"
11863+
],
11864+
"x-ms-enum": {
11865+
"name": "KeyEncryptionKeyIdentityType",
11866+
"modelAsString": true,
11867+
"values": [
11868+
{
11869+
"name": "SystemAssignedIdentity",
11870+
"value": "systemAssignedIdentity",
11871+
"description": "System assigned identity"
11872+
},
11873+
{
11874+
"name": "UserAssignedIdentity",
11875+
"value": "userAssignedIdentity",
11876+
"description": "User assigned identity"
11877+
},
11878+
{
11879+
"name": "DelegatedResourceIdentity",
11880+
"value": "delegatedResourceIdentity",
11881+
"description": "Delegated identity"
11882+
}
11883+
]
11884+
}
11885+
},
11886+
"KeyEncryptionKeyIdentityUpdate": {
1182911887
"type": "object",
1183011888
"description": "The managed identity configuration used for key vault access.",
1183111889
"properties": {
@@ -13640,6 +13698,11 @@
1364013698
"description": "Indicates whether workspace storage is enabled."
1364113699
}
1364213700
}
13701+
},
13702+
"uuid": {
13703+
"type": "string",
13704+
"format": "uuid",
13705+
"description": "Universally Unique Identifier"
1364313706
}
1364413707
},
1364513708
"parameters": {}

0 commit comments

Comments
 (0)