Skip to content

Commit a73b477

Browse files
committed
Fix examples for type updates. Add uuid type to uuid fields.
1 parent 087c53b commit a73b477

File tree

15 files changed

+42
-26
lines changed

15 files changed

+42
-26
lines changed

specification/mission/Mission.Management/examples/2024-06-01-preview/VirtualEnclave_Get.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"diagnosticDestination": "Both"
5151
},
5252
"resourceCollection": [
53-
"g"
54-
],
53+
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
54+
],
5555
"maintenanceModeConfiguration": {
5656
"mode": "Off",
5757
"principals": [

specification/mission/Mission.Management/examples/2024-06-01-preview/VirtualEnclave_Update.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@
9898
"diagnosticDestination": "Both"
9999
},
100100
"resourceCollection": [
101-
"g"
102-
],
101+
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
102+
],
103103
"maintenanceModeConfiguration": {
104104
"mode": "Off",
105105
"principals": [

specification/mission/Mission.Management/examples/2024-12-01-preview/VirtualEnclave_Get.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"diagnosticDestination": "Both"
5151
},
5252
"resourceCollection": [
53-
"g"
54-
],
53+
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
54+
],
5555
"maintenanceModeConfiguration": {
5656
"mode": "Off",
5757
"principals": [

specification/mission/Mission.Management/examples/2024-12-01-preview/VirtualEnclave_Update.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@
142142
"diagnosticDestination": "Both"
143143
},
144144
"resourceCollection": [
145-
"g"
146-
],
145+
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
146+
],
147147
"maintenanceModeConfiguration": {
148148
"mode": "Off",
149149
"principals": [

specification/mission/Mission.Management/resourcetypes/approvals/approvals.tsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import "../shared/provisioningstate.tsp";
88
using TypeSpec.Http;
99
using TypeSpec.Rest;
1010
using TypeSpec.Versioning;
11+
using Azure.Core;
1112
using Azure.ResourceManager;
1213

1314
@doc("Microsoft Mission Resource Provider management API.")
@@ -68,7 +69,7 @@ model RequestMetadata {
6869
@doc("Approver Metadata for approvals request.")
6970
model Approver {
7071
@doc("EntraId of the approver")
71-
approverEntraId: string;
72+
approverEntraId: uuid;
7273

7374
@doc("Action Performed by approver")
7475
actionPerformed: ActionPerformed;

specification/mission/Mission.Management/resourcetypes/community/community.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ union ApprovalPolicy {
127127
@doc("Approver Metadata for approvals request.")
128128
model MandatoryApprover {
129129
@doc("EntraId of the approver")
130-
approverEntraId: string;
130+
approverEntraId: Azure.Core.uuid;
131131
}
132132

133133
@added(Microsoft.Mission.Versions.v2024_12_01_preview)

specification/mission/Mission.Management/resourcetypes/postActions/approvalcallback.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Microsoft.Mission;
1616
model ApprovalCallbackRequest {
1717
@removed(Microsoft.Mission.Versions.v2024_12_01_preview)
1818
@doc("Resource Id of the item being approved or rejected")
19-
resourceId: string;
19+
resourceId: armResourceIdentifier;
2020

2121
@doc("Resource request action indicating action which needed to be performed upon calling approval-callback post action")
2222
resourceRequestAction: "Create" | "Delete" | "Update" | "Reset" | string;

specification/mission/Mission.Management/resourcetypes/shared/principal.tsp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import "@typespec/versioning";
2+
import "@azure-tools/typespec-azure-core";
23

4+
using Azure.Core;
35
using TypeSpec.Versioning;
46

57
@doc("Microsoft Mission Resource Provider management API.")
@@ -9,7 +11,7 @@ namespace Microsoft.Mission;
911
@doc("Principal for maintenance mode or role assignments")
1012
model Principal {
1113
@doc("The object id associated with the principal")
12-
id: string;
14+
id: uuid;
1315

1416
@doc("The type of the object id. We currently allow users, groups, and service principals")
1517
type: "User" | "Group" | "ServicePrincipal" | string;

specification/mission/Mission.Management/resourcetypes/shared/roleassignmentitem.tsp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import "@typespec/versioning";
2+
import "@azure-tools/typespec-azure-core";
23

4+
using Azure.Core;
35
using TypeSpec.Versioning;
46

57
@doc("Microsoft Mission Resource Provider management API.")
@@ -9,7 +11,7 @@ namespace Microsoft.Mission;
911
@doc("Role assignment item that indicates which principals should be assigned this role definition")
1012
model RoleAssignmentItem {
1113
@doc("Role definition identifier")
12-
id: string;
14+
id: uuid;
1315

1416
@doc("List of principal IDs to which to assign this role definition")
1517
principals?: Principal[];

specification/mission/resource-manager/Microsoft.Mission/preview/2024-06-01-preview/examples/VirtualEnclave_Get.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"diagnosticDestination": "Both"
5151
},
5252
"resourceCollection": [
53-
"g"
54-
],
53+
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
54+
],
5555
"maintenanceModeConfiguration": {
5656
"mode": "Off",
5757
"principals": [

specification/mission/resource-manager/Microsoft.Mission/preview/2024-06-01-preview/examples/VirtualEnclave_Update.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@
9898
"diagnosticDestination": "Both"
9999
},
100100
"resourceCollection": [
101-
"g"
102-
],
101+
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
102+
],
103103
"maintenanceModeConfiguration": {
104104
"mode": "Off",
105105
"principals": [

specification/mission/resource-manager/Microsoft.Mission/preview/2024-06-01-preview/openapi.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4267,6 +4267,7 @@
42674267
"properties": {
42684268
"resourceId": {
42694269
"type": "string",
4270+
"format": "arm-id",
42704271
"description": "Resource Id of the item being approved or rejected"
42714272
},
42724273
"resourceRequestAction": {
@@ -4454,6 +4455,11 @@
44544455
"type": "string",
44554456
"description": "Represents an Azure geography region where supported resource providers live."
44564457
},
4458+
"Azure.Core.uuid": {
4459+
"type": "string",
4460+
"format": "uuid",
4461+
"description": "Universally Unique Identifier"
4462+
},
44574463
"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityUpdate": {
44584464
"type": "object",
44594465
"description": "Managed service identity (system assigned and/or user assigned identities)",
@@ -6024,7 +6030,7 @@
60246030
"description": "Principal for maintenance mode or role assignments",
60256031
"properties": {
60266032
"id": {
6027-
"type": "string",
6033+
"$ref": "#/definitions/Azure.Core.uuid",
60286034
"description": "The object id associated with the principal"
60296035
},
60306036
"type": {

specification/mission/resource-manager/Microsoft.Mission/preview/2024-12-01-preview/examples/VirtualEnclave_Get.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"diagnosticDestination": "Both"
5151
},
5252
"resourceCollection": [
53-
"g"
54-
],
53+
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
54+
],
5555
"maintenanceModeConfiguration": {
5656
"mode": "Off",
5757
"principals": [

specification/mission/resource-manager/Microsoft.Mission/preview/2024-12-01-preview/examples/VirtualEnclave_Update.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@
142142
"diagnosticDestination": "Both"
143143
},
144144
"resourceCollection": [
145-
"g"
146-
],
145+
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
146+
],
147147
"maintenanceModeConfiguration": {
148148
"mode": "Off",
149149
"principals": [

specification/mission/resource-manager/Microsoft.Mission/preview/2024-12-01-preview/openapi.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5098,7 +5098,7 @@
50985098
"description": "Approver Metadata for approvals request.",
50995099
"properties": {
51005100
"approverEntraId": {
5101-
"type": "string",
5101+
"$ref": "#/definitions/Azure.Core.uuid",
51025102
"description": "EntraId of the approver"
51035103
},
51045104
"actionPerformed": {
@@ -5121,6 +5121,11 @@
51215121
"type": "string",
51225122
"description": "Represents an Azure geography region where supported resource providers live."
51235123
},
5124+
"Azure.Core.uuid": {
5125+
"type": "string",
5126+
"format": "uuid",
5127+
"description": "Universally Unique Identifier"
5128+
},
51245129
"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityUpdate": {
51255130
"type": "object",
51265131
"description": "Managed service identity (system assigned and/or user assigned identities)",
@@ -6686,7 +6691,7 @@
66866691
"description": "Approver Metadata for approvals request.",
66876692
"properties": {
66886693
"approverEntraId": {
6689-
"type": "string",
6694+
"$ref": "#/definitions/Azure.Core.uuid",
66906695
"description": "EntraId of the approver"
66916696
}
66926697
},
@@ -6711,7 +6716,7 @@
67116716
"description": "Principal for maintenance mode or role assignments",
67126717
"properties": {
67136718
"id": {
6714-
"type": "string",
6719+
"$ref": "#/definitions/Azure.Core.uuid",
67156720
"description": "The object id associated with the principal"
67166721
},
67176722
"type": {
@@ -6869,7 +6874,7 @@
68696874
"description": "Role assignment item that indicates which principals should be assigned this role definition",
68706875
"properties": {
68716876
"id": {
6872-
"type": "string",
6877+
"$ref": "#/definitions/Azure.Core.uuid",
68736878
"description": "Role definition identifier"
68746879
},
68756880
"principals": {

0 commit comments

Comments
 (0)