Skip to content

Commit

Permalink
Fix examples for type updates. Add uuid type to uuid fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoodyear committed Mar 8, 2025
1 parent 087c53b commit a73b477
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"diagnosticDestination": "Both"
},
"resourceCollection": [
"g"
],
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
],
"maintenanceModeConfiguration": {
"mode": "Off",
"principals": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
"diagnosticDestination": "Both"
},
"resourceCollection": [
"g"
],
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
],
"maintenanceModeConfiguration": {
"mode": "Off",
"principals": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"diagnosticDestination": "Both"
},
"resourceCollection": [
"g"
],
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
],
"maintenanceModeConfiguration": {
"mode": "Off",
"principals": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
"diagnosticDestination": "Both"
},
"resourceCollection": [
"g"
],
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
],
"maintenanceModeConfiguration": {
"mode": "Off",
"principals": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "../shared/provisioningstate.tsp";
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;
using Azure.ResourceManager;

@doc("Microsoft Mission Resource Provider management API.")
Expand Down Expand Up @@ -68,7 +69,7 @@ model RequestMetadata {
@doc("Approver Metadata for approvals request.")
model Approver {
@doc("EntraId of the approver")
approverEntraId: string;
approverEntraId: uuid;

@doc("Action Performed by approver")
actionPerformed: ActionPerformed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ union ApprovalPolicy {
@doc("Approver Metadata for approvals request.")
model MandatoryApprover {
@doc("EntraId of the approver")
approverEntraId: string;
approverEntraId: Azure.Core.uuid;
}

@added(Microsoft.Mission.Versions.v2024_12_01_preview)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.Mission;
model ApprovalCallbackRequest {
@removed(Microsoft.Mission.Versions.v2024_12_01_preview)
@doc("Resource Id of the item being approved or rejected")
resourceId: string;
resourceId: armResourceIdentifier;

@doc("Resource request action indicating action which needed to be performed upon calling approval-callback post action")
resourceRequestAction: "Create" | "Delete" | "Update" | "Reset" | string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";

using Azure.Core;
using TypeSpec.Versioning;

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

@doc("The type of the object id. We currently allow users, groups, and service principals")
type: "User" | "Group" | "ServicePrincipal" | string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";

using Azure.Core;
using TypeSpec.Versioning;

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

@doc("List of principal IDs to which to assign this role definition")
principals?: Principal[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"diagnosticDestination": "Both"
},
"resourceCollection": [
"g"
],
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
],
"maintenanceModeConfiguration": {
"mode": "Off",
"principals": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
"diagnosticDestination": "Both"
},
"resourceCollection": [
"g"
],
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
],
"maintenanceModeConfiguration": {
"mode": "Off",
"principals": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4267,6 +4267,7 @@
"properties": {
"resourceId": {
"type": "string",
"format": "arm-id",
"description": "Resource Id of the item being approved or rejected"
},
"resourceRequestAction": {
Expand Down Expand Up @@ -4454,6 +4455,11 @@
"type": "string",
"description": "Represents an Azure geography region where supported resource providers live."
},
"Azure.Core.uuid": {
"type": "string",
"format": "uuid",
"description": "Universally Unique Identifier"
},
"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityUpdate": {
"type": "object",
"description": "Managed service identity (system assigned and/or user assigned identities)",
Expand Down Expand Up @@ -6024,7 +6030,7 @@
"description": "Principal for maintenance mode or role assignments",
"properties": {
"id": {
"type": "string",
"$ref": "#/definitions/Azure.Core.uuid",
"description": "The object id associated with the principal"
},
"type": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"diagnosticDestination": "Both"
},
"resourceCollection": [
"g"
],
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
],
"maintenanceModeConfiguration": {
"mode": "Off",
"principals": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
"diagnosticDestination": "Both"
},
"resourceCollection": [
"g"
],
"/subscriptions/c64f6eca-bdc5-4bc2-88d6-f8f1dc23f86c/resourceGroups/TestMyRg"
],
"maintenanceModeConfiguration": {
"mode": "Off",
"principals": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5098,7 +5098,7 @@
"description": "Approver Metadata for approvals request.",
"properties": {
"approverEntraId": {
"type": "string",
"$ref": "#/definitions/Azure.Core.uuid",
"description": "EntraId of the approver"
},
"actionPerformed": {
Expand All @@ -5121,6 +5121,11 @@
"type": "string",
"description": "Represents an Azure geography region where supported resource providers live."
},
"Azure.Core.uuid": {
"type": "string",
"format": "uuid",
"description": "Universally Unique Identifier"
},
"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityUpdate": {
"type": "object",
"description": "Managed service identity (system assigned and/or user assigned identities)",
Expand Down Expand Up @@ -6686,7 +6691,7 @@
"description": "Approver Metadata for approvals request.",
"properties": {
"approverEntraId": {
"type": "string",
"$ref": "#/definitions/Azure.Core.uuid",
"description": "EntraId of the approver"
}
},
Expand All @@ -6711,7 +6716,7 @@
"description": "Principal for maintenance mode or role assignments",
"properties": {
"id": {
"type": "string",
"$ref": "#/definitions/Azure.Core.uuid",
"description": "The object id associated with the principal"
},
"type": {
Expand Down Expand Up @@ -6869,7 +6874,7 @@
"description": "Role assignment item that indicates which principals should be assigned this role definition",
"properties": {
"id": {
"type": "string",
"$ref": "#/definitions/Azure.Core.uuid",
"description": "Role definition identifier"
},
"principals": {
Expand Down

0 comments on commit a73b477

Please sign in to comment.