diff --git a/.chronus/changes/fix-common-types-after-review-2025-1-22-21-12-31.md b/.chronus/changes/fix-common-types-after-review-2025-1-22-21-12-31.md new file mode 100644 index 0000000000..b89c591fda --- /dev/null +++ b/.chronus/changes/fix-common-types-after-review-2025-1-22-21-12-31.md @@ -0,0 +1,7 @@ +--- +changeKind: fix +packages: + - "@azure-tools/typespec-azure-resource-manager" +--- + +Addressing common type differences with common types in azure-rest-api-specs, such as ordering of elements, lower/upper case in definition names, typos, and incorrect format on the next link. diff --git a/packages/samples/common-types/openapi/v3/managedidentity.json b/packages/samples/common-types/openapi/v3/managedidentity.json index feb609e60c..a775b5fd23 100644 --- a/packages/samples/common-types/openapi/v3/managedidentity.json +++ b/packages/samples/common-types/openapi/v3/managedidentity.json @@ -140,16 +140,16 @@ "type": "object", "description": "User assigned identity properties", "properties": { - "clientId": { + "principalId": { "type": "string", "format": "uuid", - "description": "The client ID of the assigned identity.", + "description": "The principal ID of the assigned identity.", "readOnly": true }, - "principalId": { + "clientId": { "type": "string", "format": "uuid", - "description": "The principal ID of the assigned identity.", + "description": "The client ID of the assigned identity.", "readOnly": true } } diff --git a/packages/samples/common-types/openapi/v3/privatelinks.json b/packages/samples/common-types/openapi/v3/privatelinks.json index 4bab1950e6..1bc1539fff 100644 --- a/packages/samples/common-types/openapi/v3/privatelinks.json +++ b/packages/samples/common-types/openapi/v3/privatelinks.json @@ -8,11 +8,11 @@ "definitions": { "PrivateEndpoint": { "type": "object", - "description": "The Private Endpoint resource.", + "description": "The private endpoint resource.", "properties": { "id": { "type": "string", - "description": "The resource identifier for private endpoint", + "description": "The resource identifier of the private endpoint", "readOnly": true } } @@ -120,7 +120,7 @@ { "name": "Pending", "value": "Pending", - "description": "Connectionaiting for approval or rejection" + "description": "Connection waiting for approval or rejection" }, { "name": "Approved", diff --git a/packages/samples/common-types/openapi/v3/types.json b/packages/samples/common-types/openapi/v3/types.json index 1c1c097ad9..46568c93dd 100644 --- a/packages/samples/common-types/openapi/v3/types.json +++ b/packages/samples/common-types/openapi/v3/types.json @@ -96,20 +96,6 @@ } } }, - "EncryptionProperties": { - "type": "object", - "description": "Configuration of key for data encryption", - "properties": { - "status": { - "$ref": "#/definitions/EncryptionStatus", - "description": "Indicates whether or not the encryption is enabled for container registry." - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, "EncryptionStatus": { "type": "string", "description": "Indicates whether or not the encryption is enabled for container registry.", @@ -244,32 +230,6 @@ } } }, - "LocationData": { - "type": "object", - "description": "Metadata pertaining to the geographic location of the resource.", - "properties": { - "name": { - "type": "string", - "description": "A canonical name for the geographic or physical location.", - "maxLength": 256 - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, "LocationResourceParameter": { "type": "object", "description": "The default location parameter type.", @@ -503,7 +463,7 @@ "readOnly": true }, "systemData": { - "$ref": "#/definitions/SystemData", + "$ref": "#/definitions/systemData", "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "readOnly": true } @@ -625,38 +585,6 @@ ] } }, - "SystemData": { - "type": "object", - "description": "Metadata pertaining to creation and last modification of the resource.", - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "$ref": "#/definitions/createdByType", - "description": "The type of identity that created the resource." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "$ref": "#/definitions/createdByType", - "description": "The type of identity that last modified the resource." - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, "TrackedResource": { "type": "object", "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", @@ -721,6 +649,78 @@ } ] } + }, + "encryptionProperties": { + "type": "object", + "description": "Configuration of key for data encryption", + "properties": { + "status": { + "$ref": "#/definitions/EncryptionStatus", + "description": "Indicates whether or not the encryption is enabled for container registry." + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "locationData": { + "type": "object", + "description": "Metadata pertaining to the geographic location of the resource.", + "properties": { + "name": { + "type": "string", + "description": "A canonical name for the geographic or physical location.", + "maxLength": 256 + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": [ + "name" + ] + }, + "systemData": { + "type": "object", + "description": "Metadata pertaining to creation and last modification of the resource.", + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "$ref": "#/definitions/createdByType", + "description": "The type of identity that created the resource." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "$ref": "#/definitions/createdByType", + "description": "The type of identity that last modified the resource." + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } } }, "parameters": { @@ -769,6 +769,7 @@ "description": "The ID of the target subscription. The value must be an UUID.", "required": true, "type": "string", + "minLength": 1, "x-ms-parameter-location": "client" } } diff --git a/packages/samples/common-types/openapi/v4/customermanagedkeys.json b/packages/samples/common-types/openapi/v4/customermanagedkeys.json index 4f8aa8b32a..2f98b4a2bc 100644 --- a/packages/samples/common-types/openapi/v4/customermanagedkeys.json +++ b/packages/samples/common-types/openapi/v4/customermanagedkeys.json @@ -6,34 +6,6 @@ }, "paths": {}, "definitions": { - "CustomerManagedKeyEncryption": { - "type": "object", - "description": "Customer-managed key encryption properties for the resource.", - "properties": { - "keyEncryptionKeyIdentity": { - "$ref": "#/definitions/KeyEncryptionKeyIdentity", - "description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault." - }, - "keyEncryptionKeyUrl": { - "type": "string", - "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." - } - } - }, - "Encryption": { - "type": "object", - "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", - "properties": { - "infrastructureEncryption": { - "$ref": "#/definitions/InfrastructureEncryption", - "description": "Values are enabled and disabled." - }, - "customerManagedKeyEncryption": { - "$ref": "#/definitions/CustomerManagedKeyEncryption", - "description": "All Customer-managed key encryption properties for the resource." - } - } - }, "InfrastructureEncryption": { "type": "string", "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", @@ -107,6 +79,34 @@ } ] } + }, + "customerManagedKeyEncryption": { + "type": "object", + "description": "Customer-managed key encryption properties for the resource.", + "properties": { + "keyEncryptionKeyIdentity": { + "$ref": "#/definitions/KeyEncryptionKeyIdentity", + "description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault." + }, + "keyEncryptionKeyUrl": { + "type": "string", + "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." + } + } + }, + "encryption": { + "type": "object", + "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", + "properties": { + "infrastructureEncryption": { + "$ref": "#/definitions/InfrastructureEncryption", + "description": "Values are enabled and disabled." + }, + "customerManagedKeyEncryption": { + "$ref": "#/definitions/customerManagedKeyEncryption", + "description": "All Customer-managed key encryption properties for the resource." + } + } } } } \ No newline at end of file diff --git a/packages/samples/common-types/openapi/v4/managedidentity.json b/packages/samples/common-types/openapi/v4/managedidentity.json index c91495b75e..17b2def937 100644 --- a/packages/samples/common-types/openapi/v4/managedidentity.json +++ b/packages/samples/common-types/openapi/v4/managedidentity.json @@ -140,16 +140,16 @@ "type": "object", "description": "User assigned identity properties", "properties": { - "clientId": { + "principalId": { "type": "string", "format": "uuid", - "description": "The client ID of the assigned identity.", + "description": "The principal ID of the assigned identity.", "readOnly": true }, - "principalId": { + "clientId": { "type": "string", "format": "uuid", - "description": "The principal ID of the assigned identity.", + "description": "The client ID of the assigned identity.", "readOnly": true } } diff --git a/packages/samples/common-types/openapi/v4/privatelinks.json b/packages/samples/common-types/openapi/v4/privatelinks.json index 4e1ca72e89..99a5116476 100644 --- a/packages/samples/common-types/openapi/v4/privatelinks.json +++ b/packages/samples/common-types/openapi/v4/privatelinks.json @@ -8,12 +8,12 @@ "definitions": { "PrivateEndpoint": { "type": "object", - "description": "The Private Endpoint resource.", + "description": "The private endpoint resource.", "properties": { "id": { "type": "string", "format": "arm-id", - "description": "The resource identifier for private endpoint", + "description": "The resource identifier of the private endpoint", "readOnly": true } } @@ -129,7 +129,7 @@ { "name": "Pending", "value": "Pending", - "description": "Connectionaiting for approval or rejection" + "description": "Connection waiting for approval or rejection" }, { "name": "Approved", diff --git a/packages/samples/common-types/openapi/v4/types.json b/packages/samples/common-types/openapi/v4/types.json index 3692bf34be..affa955a11 100644 --- a/packages/samples/common-types/openapi/v4/types.json +++ b/packages/samples/common-types/openapi/v4/types.json @@ -96,20 +96,6 @@ } } }, - "EncryptionProperties": { - "type": "object", - "description": "Configuration of key for data encryption", - "properties": { - "status": { - "$ref": "#/definitions/EncryptionStatus", - "description": "Indicates whether or not the encryption is enabled for container registry." - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, "EncryptionStatus": { "type": "string", "description": "Indicates whether or not the encryption is enabled for container registry.", @@ -246,32 +232,6 @@ } } }, - "LocationData": { - "type": "object", - "description": "Metadata pertaining to the geographic location of the resource.", - "properties": { - "name": { - "type": "string", - "description": "A canonical name for the geographic or physical location.", - "maxLength": 256 - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, "LocationResourceParameter": { "type": "object", "description": "The default location parameter type.", @@ -506,7 +466,7 @@ "readOnly": true }, "systemData": { - "$ref": "#/definitions/SystemData", + "$ref": "#/definitions/systemData", "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "readOnly": true } @@ -628,38 +588,6 @@ ] } }, - "SystemData": { - "type": "object", - "description": "Metadata pertaining to creation and last modification of the resource.", - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "$ref": "#/definitions/createdByType", - "description": "The type of identity that created the resource." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "$ref": "#/definitions/createdByType", - "description": "The type of identity that last modified the resource." - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, "TrackedResource": { "type": "object", "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", @@ -724,6 +652,78 @@ } ] } + }, + "encryptionProperties": { + "type": "object", + "description": "Configuration of key for data encryption", + "properties": { + "status": { + "$ref": "#/definitions/EncryptionStatus", + "description": "Indicates whether or not the encryption is enabled for container registry." + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "locationData": { + "type": "object", + "description": "Metadata pertaining to the geographic location of the resource.", + "properties": { + "name": { + "type": "string", + "description": "A canonical name for the geographic or physical location.", + "maxLength": 256 + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": [ + "name" + ] + }, + "systemData": { + "type": "object", + "description": "Metadata pertaining to creation and last modification of the resource.", + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "$ref": "#/definitions/createdByType", + "description": "The type of identity that created the resource." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "$ref": "#/definitions/createdByType", + "description": "The type of identity that last modified the resource." + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } } }, "parameters": { @@ -811,6 +811,7 @@ "required": true, "type": "string", "format": "uuid", + "minLength": 1, "x-ms-parameter-location": "client" }, "TenantIdParameter": { diff --git a/packages/samples/common-types/openapi/v5/customermanagedkeys.json b/packages/samples/common-types/openapi/v5/customermanagedkeys.json index 1c45aedf1b..ebffa53091 100644 --- a/packages/samples/common-types/openapi/v5/customermanagedkeys.json +++ b/packages/samples/common-types/openapi/v5/customermanagedkeys.json @@ -6,34 +6,6 @@ }, "paths": {}, "definitions": { - "CustomerManagedKeyEncryption": { - "type": "object", - "description": "Customer-managed key encryption properties for the resource.", - "properties": { - "keyEncryptionKeyIdentity": { - "$ref": "#/definitions/KeyEncryptionKeyIdentity", - "description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault." - }, - "keyEncryptionKeyUrl": { - "type": "string", - "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." - } - } - }, - "Encryption": { - "type": "object", - "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", - "properties": { - "infrastructureEncryption": { - "$ref": "#/definitions/InfrastructureEncryption", - "description": "Values are enabled and disabled." - }, - "customerManagedKeyEncryption": { - "$ref": "#/definitions/CustomerManagedKeyEncryption", - "description": "All Customer-managed key encryption properties for the resource." - } - } - }, "InfrastructureEncryption": { "type": "string", "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", @@ -112,6 +84,34 @@ } ] } + }, + "customerManagedKeyEncryption": { + "type": "object", + "description": "Customer-managed key encryption properties for the resource.", + "properties": { + "keyEncryptionKeyIdentity": { + "$ref": "#/definitions/KeyEncryptionKeyIdentity", + "description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault." + }, + "keyEncryptionKeyUrl": { + "type": "string", + "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." + } + } + }, + "encryption": { + "type": "object", + "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", + "properties": { + "infrastructureEncryption": { + "$ref": "#/definitions/InfrastructureEncryption", + "description": "Values are enabled and disabled." + }, + "customerManagedKeyEncryption": { + "$ref": "#/definitions/customerManagedKeyEncryption", + "description": "All Customer-managed key encryption properties for the resource." + } + } } } } \ No newline at end of file diff --git a/packages/samples/common-types/openapi/v5/managedidentity.json b/packages/samples/common-types/openapi/v5/managedidentity.json index 8262d00155..6c3046e250 100644 --- a/packages/samples/common-types/openapi/v5/managedidentity.json +++ b/packages/samples/common-types/openapi/v5/managedidentity.json @@ -146,16 +146,16 @@ "type": "object", "description": "User assigned identity properties", "properties": { - "clientId": { + "principalId": { "type": "string", "format": "uuid", - "description": "The client ID of the assigned identity.", + "description": "The principal ID of the assigned identity.", "readOnly": true }, - "principalId": { + "clientId": { "type": "string", "format": "uuid", - "description": "The principal ID of the assigned identity.", + "description": "The client ID of the assigned identity.", "readOnly": true } } diff --git a/packages/samples/common-types/openapi/v5/networksecurityperimeter.json b/packages/samples/common-types/openapi/v5/networksecurityperimeter.json index 5751cb6a1d..09459f9800 100644 --- a/packages/samples/common-types/openapi/v5/networksecurityperimeter.json +++ b/packages/samples/common-types/openapi/v5/networksecurityperimeter.json @@ -2,7 +2,8 @@ "swagger": "2.0", "info": { "title": "Network security perimeter common type definitions", - "version": "v5" + "version": "v5", + "description": "Common types for network security perimeters based on a shared API specification. These common, versioned type definitions are intended for resource providers (RPs, except Network RP) to use, and reuse, for defining their own API versions that share a set of type definitions that is consistent across providers." }, "host": "management.azure.com", "paths": {}, diff --git a/packages/samples/common-types/openapi/v5/privatelinks.json b/packages/samples/common-types/openapi/v5/privatelinks.json index 338ef800c6..baf0818be3 100644 --- a/packages/samples/common-types/openapi/v5/privatelinks.json +++ b/packages/samples/common-types/openapi/v5/privatelinks.json @@ -8,12 +8,12 @@ "definitions": { "PrivateEndpoint": { "type": "object", - "description": "The Private Endpoint resource.", + "description": "The private endpoint resource.", "properties": { "id": { "type": "string", "format": "arm-id", - "description": "The resource identifier for private endpoint", + "description": "The resource identifier of the private endpoint", "readOnly": true } } @@ -129,7 +129,7 @@ { "name": "Pending", "value": "Pending", - "description": "Connectionaiting for approval or rejection" + "description": "Connection waiting for approval or rejection" }, { "name": "Approved", diff --git a/packages/samples/common-types/openapi/v5/types.json b/packages/samples/common-types/openapi/v5/types.json index 2897d513ba..3978b8a923 100644 --- a/packages/samples/common-types/openapi/v5/types.json +++ b/packages/samples/common-types/openapi/v5/types.json @@ -96,20 +96,6 @@ } } }, - "EncryptionProperties": { - "type": "object", - "description": "Configuration of key for data encryption", - "properties": { - "status": { - "$ref": "#/definitions/EncryptionStatus", - "description": "Indicates whether or not the encryption is enabled for container registry." - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, "EncryptionStatus": { "type": "string", "description": "Indicates whether or not the encryption is enabled for container registry.", @@ -246,32 +232,6 @@ } } }, - "LocationData": { - "type": "object", - "description": "Metadata pertaining to the geographic location of the resource.", - "properties": { - "name": { - "type": "string", - "description": "A canonical name for the geographic or physical location.", - "maxLength": 256 - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, "LocationResourceParameter": { "type": "object", "description": "The default location parameter type.", @@ -513,7 +473,7 @@ "readOnly": true }, "systemData": { - "$ref": "#/definitions/SystemData", + "$ref": "#/definitions/systemData", "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "readOnly": true } @@ -635,38 +595,6 @@ ] } }, - "SystemData": { - "type": "object", - "description": "Metadata pertaining to creation and last modification of the resource.", - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "$ref": "#/definitions/createdByType", - "description": "The type of identity that created the resource." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "$ref": "#/definitions/createdByType", - "description": "The type of identity that last modified the resource." - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, "TrackedResource": { "type": "object", "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", @@ -731,6 +659,78 @@ } ] } + }, + "encryptionProperties": { + "type": "object", + "description": "Configuration of key for data encryption", + "properties": { + "status": { + "$ref": "#/definitions/EncryptionStatus", + "description": "Indicates whether or not the encryption is enabled for container registry." + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "locationData": { + "type": "object", + "description": "Metadata pertaining to the geographic location of the resource.", + "properties": { + "name": { + "type": "string", + "description": "A canonical name for the geographic or physical location.", + "maxLength": 256 + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": [ + "name" + ] + }, + "systemData": { + "type": "object", + "description": "Metadata pertaining to creation and last modification of the resource.", + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "$ref": "#/definitions/createdByType", + "description": "The type of identity that created the resource." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "$ref": "#/definitions/createdByType", + "description": "The type of identity that last modified the resource." + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } } }, "parameters": { @@ -818,6 +818,7 @@ "required": true, "type": "string", "format": "uuid", + "minLength": 1, "x-ms-parameter-location": "client" }, "TenantIdParameter": { diff --git a/packages/samples/common-types/openapi/v6/customermanagedkeys.json b/packages/samples/common-types/openapi/v6/customermanagedkeys.json index 11c6623a52..c606c344e4 100644 --- a/packages/samples/common-types/openapi/v6/customermanagedkeys.json +++ b/packages/samples/common-types/openapi/v6/customermanagedkeys.json @@ -6,34 +6,6 @@ }, "paths": {}, "definitions": { - "CustomerManagedKeyEncryption": { - "type": "object", - "description": "Customer-managed key encryption properties for the resource.", - "properties": { - "keyEncryptionKeyIdentity": { - "$ref": "#/definitions/KeyEncryptionKeyIdentity", - "description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault." - }, - "keyEncryptionKeyUrl": { - "type": "string", - "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." - } - } - }, - "Encryption": { - "type": "object", - "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", - "properties": { - "infrastructureEncryption": { - "$ref": "#/definitions/InfrastructureEncryption", - "description": "Values are enabled and disabled." - }, - "customerManagedKeyEncryption": { - "$ref": "#/definitions/CustomerManagedKeyEncryption", - "description": "All Customer-managed key encryption properties for the resource." - } - } - }, "InfrastructureEncryption": { "type": "string", "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", @@ -112,6 +84,34 @@ } ] } + }, + "customerManagedKeyEncryption": { + "type": "object", + "description": "Customer-managed key encryption properties for the resource.", + "properties": { + "keyEncryptionKeyIdentity": { + "$ref": "#/definitions/KeyEncryptionKeyIdentity", + "description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault." + }, + "keyEncryptionKeyUrl": { + "type": "string", + "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." + } + } + }, + "encryption": { + "type": "object", + "description": "(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.", + "properties": { + "infrastructureEncryption": { + "$ref": "#/definitions/InfrastructureEncryption", + "description": "Values are enabled and disabled." + }, + "customerManagedKeyEncryption": { + "$ref": "#/definitions/customerManagedKeyEncryption", + "description": "All Customer-managed key encryption properties for the resource." + } + } } } } \ No newline at end of file diff --git a/packages/samples/common-types/openapi/v6/managedidentity.json b/packages/samples/common-types/openapi/v6/managedidentity.json index e2973b0ab9..4f4f3fe515 100644 --- a/packages/samples/common-types/openapi/v6/managedidentity.json +++ b/packages/samples/common-types/openapi/v6/managedidentity.json @@ -133,16 +133,16 @@ "type": "object", "description": "User assigned identity properties", "properties": { - "clientId": { + "principalId": { "type": "string", "format": "uuid", - "description": "The client ID of the assigned identity.", + "description": "The principal ID of the assigned identity.", "readOnly": true }, - "principalId": { + "clientId": { "type": "string", "format": "uuid", - "description": "The principal ID of the assigned identity.", + "description": "The client ID of the assigned identity.", "readOnly": true } } diff --git a/packages/samples/common-types/openapi/v6/networksecurityperimeter.json b/packages/samples/common-types/openapi/v6/networksecurityperimeter.json index 30897d7f22..0158c5cd3b 100644 --- a/packages/samples/common-types/openapi/v6/networksecurityperimeter.json +++ b/packages/samples/common-types/openapi/v6/networksecurityperimeter.json @@ -2,7 +2,8 @@ "swagger": "2.0", "info": { "title": "Network security perimeter common type definitions", - "version": "v6" + "version": "v6", + "description": "Common types for network security perimeters based on a shared API specification. These common, versioned type definitions are intended for resource providers (RPs, except Network RP) to use, and reuse, for defining their own API versions that share a set of type definitions that is consistent across providers." }, "host": "management.azure.com", "paths": {}, diff --git a/packages/samples/common-types/openapi/v6/privatelinks.json b/packages/samples/common-types/openapi/v6/privatelinks.json index 3bc6a553e7..763ae60285 100644 --- a/packages/samples/common-types/openapi/v6/privatelinks.json +++ b/packages/samples/common-types/openapi/v6/privatelinks.json @@ -8,12 +8,12 @@ "definitions": { "PrivateEndpoint": { "type": "object", - "description": "The Private Endpoint resource.", + "description": "The private endpoint resource.", "properties": { "id": { "type": "string", "format": "arm-id", - "description": "The resource identifier for private endpoint", + "description": "The resource identifier of the private endpoint", "readOnly": true } } @@ -48,6 +48,7 @@ }, "nextLink": { "type": "string", + "format": "uri", "description": "URL to get the next set of operation list results (if there are any).", "readOnly": true } @@ -134,7 +135,7 @@ { "name": "Pending", "value": "Pending", - "description": "Connectionaiting for approval or rejection" + "description": "Connection waiting for approval or rejection" }, { "name": "Approved", @@ -179,6 +180,7 @@ }, "nextLink": { "type": "string", + "format": "uri", "description": "URL to get the next set of operation list results (if there are any).", "readOnly": true } diff --git a/packages/samples/common-types/openapi/v6/types.json b/packages/samples/common-types/openapi/v6/types.json index 4841f62d43..b673faaa48 100644 --- a/packages/samples/common-types/openapi/v6/types.json +++ b/packages/samples/common-types/openapi/v6/types.json @@ -96,20 +96,6 @@ } } }, - "EncryptionProperties": { - "type": "object", - "description": "Configuration of key for data encryption", - "properties": { - "status": { - "$ref": "#/definitions/EncryptionStatus", - "description": "Indicates whether or not the encryption is enabled for container registry." - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, "EncryptionStatus": { "type": "string", "description": "Indicates whether or not the encryption is enabled for container registry.", @@ -224,32 +210,6 @@ } } }, - "LocationData": { - "type": "object", - "description": "Metadata pertaining to the geographic location of the resource.", - "properties": { - "name": { - "type": "string", - "description": "A canonical name for the geographic or physical location.", - "maxLength": 256 - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, "LocationResourceParameter": { "type": "object", "description": "The default location parameter type.", @@ -491,7 +451,7 @@ "readOnly": true }, "systemData": { - "$ref": "#/definitions/SystemData", + "$ref": "#/definitions/systemData", "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "readOnly": true } @@ -613,38 +573,6 @@ ] } }, - "SystemData": { - "type": "object", - "description": "Metadata pertaining to creation and last modification of the resource.", - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "$ref": "#/definitions/createdByType", - "description": "The type of identity that created the resource." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "$ref": "#/definitions/createdByType", - "description": "The type of identity that last modified the resource." - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, "TrackedResource": { "type": "object", "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", @@ -709,6 +637,78 @@ } ] } + }, + "encryptionProperties": { + "type": "object", + "description": "Configuration of key for data encryption", + "properties": { + "status": { + "$ref": "#/definitions/EncryptionStatus", + "description": "Indicates whether or not the encryption is enabled for container registry." + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "locationData": { + "type": "object", + "description": "Metadata pertaining to the geographic location of the resource.", + "properties": { + "name": { + "type": "string", + "description": "A canonical name for the geographic or physical location.", + "maxLength": 256 + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": [ + "name" + ] + }, + "systemData": { + "type": "object", + "description": "Metadata pertaining to creation and last modification of the resource.", + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "$ref": "#/definitions/createdByType", + "description": "The type of identity that created the resource." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "$ref": "#/definitions/createdByType", + "description": "The type of identity that last modified the resource." + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } } }, "parameters": { @@ -796,6 +796,7 @@ "required": true, "type": "string", "format": "uuid", + "minLength": 1, "x-ms-parameter-location": "client" }, "TenantIdParameter": { diff --git a/packages/samples/common-types/src/customer-managed-keys.tsp b/packages/samples/common-types/src/customer-managed-keys.tsp index 4284e442c9..9ef42c20b7 100644 --- a/packages/samples/common-types/src/customer-managed-keys.tsp +++ b/packages/samples/common-types/src/customer-managed-keys.tsp @@ -7,4 +7,4 @@ using ClientGenerator.Core; namespace Azure.ResourceManager.CommonTypes; -@@clientName(Encryption, "encryption", "@azure-tools/typespec-autorest"); +@@clientName(encryption, "encryption", "@azure-tools/typespec-autorest"); diff --git a/packages/samples/common-types/src/network-security-perimeter.tsp b/packages/samples/common-types/src/network-security-perimeter.tsp index 81b390dcae..16015b4a3d 100644 --- a/packages/samples/common-types/src/network-security-perimeter.tsp +++ b/packages/samples/common-types/src/network-security-perimeter.tsp @@ -9,6 +9,7 @@ using OpenAPI; @info({ title: "Network security perimeter common type definitions", }) +@doc("Common types for network security perimeters based on a shared API specification. These common, versioned type definitions are intended for resource providers (RPs, except Network RP) to use, and reuse, for defining their own API versions that share a set of type definitions that is consistent across providers.") namespace Azure.ResourceManager.CommonTypes; @useRef("./types.json#/definitions/Resource") diff --git a/packages/typespec-azure-resource-manager/lib/backcompat.tsp b/packages/typespec-azure-resource-manager/lib/backcompat.tsp index ad8a40f27b..a349174b97 100644 --- a/packages/typespec-azure-resource-manager/lib/backcompat.tsp +++ b/packages/typespec-azure-resource-manager/lib/backcompat.tsp @@ -6,8 +6,8 @@ namespace Azure.ResourceManager; alias InfrastructureEncryption = CommonTypes.InfrastructureEncryption; alias KeyEncryptionIdentity = CommonTypes.KeyEncryptionKeyIdentity; alias KeyEncryptionKeyIdentity = CommonTypes.KeyEncryptionKeyIdentity; -alias CustomerManagedKeyEncryption = CommonTypes.CustomerManagedKeyEncryption; -alias EncryptionConfiguration = CommonTypes.Encryption; +alias CustomerManagedKeyEncryption = CommonTypes.customerManagedKeyEncryption; +alias EncryptionConfiguration = CommonTypes.encryption; // private-links alias PrivateEndpoint = CommonTypes.PrivateEndpoint; diff --git a/packages/typespec-azure-resource-manager/lib/common-types/customer-managed-keys-ref.tsp b/packages/typespec-azure-resource-manager/lib/common-types/customer-managed-keys-ref.tsp index b71766b90f..1898c390c8 100644 --- a/packages/typespec-azure-resource-manager/lib/common-types/customer-managed-keys-ref.tsp +++ b/packages/typespec-azure-resource-manager/lib/common-types/customer-managed-keys-ref.tsp @@ -4,33 +4,33 @@ using Azure.ResourceManager.CommonTypes.Private; namespace Azure.ResourceManager.CommonTypes; -@@armCommonDefinition(Encryption, +@@armCommonDefinition(encryption, "encryption", #{ version: Azure.ResourceManager.CommonTypes.Versions.v4, isDefault: true }, "customermanagedkeys.json" ); -@@armCommonDefinition(Encryption, +@@armCommonDefinition(encryption, "encryption", Azure.ResourceManager.CommonTypes.Versions.v5, "customermanagedkeys.json" ); -@@armCommonDefinition(Encryption, +@@armCommonDefinition(encryption, "encryption", Azure.ResourceManager.CommonTypes.Versions.v6, "customermanagedkeys.json" ); -@@armCommonDefinition(CustomerManagedKeyEncryption, +@@armCommonDefinition(customerManagedKeyEncryption, "customerManagedKeyEncryption", #{ version: Azure.ResourceManager.CommonTypes.Versions.v4, isDefault: true }, "customermanagedkeys.json" ); -@@armCommonDefinition(CustomerManagedKeyEncryption, +@@armCommonDefinition(customerManagedKeyEncryption, "customerManagedKeyEncryption", Azure.ResourceManager.CommonTypes.Versions.v5, "customermanagedkeys.json" ); -@@armCommonDefinition(CustomerManagedKeyEncryption, +@@armCommonDefinition(customerManagedKeyEncryption, "customerManagedKeyEncryption", Azure.ResourceManager.CommonTypes.Versions.v6, "customermanagedkeys.json" diff --git a/packages/typespec-azure-resource-manager/lib/common-types/customer-managed-keys.tsp b/packages/typespec-azure-resource-manager/lib/common-types/customer-managed-keys.tsp index 761a96429a..46471f4c25 100644 --- a/packages/typespec-azure-resource-manager/lib/common-types/customer-managed-keys.tsp +++ b/packages/typespec-azure-resource-manager/lib/common-types/customer-managed-keys.tsp @@ -49,7 +49,7 @@ model KeyEncryptionKeyIdentity { /** Customer-managed key encryption properties for the resource. */ @added(Versions.v4) -model CustomerManagedKeyEncryption { +model customerManagedKeyEncryption { /** All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. */ keyEncryptionKeyIdentity?: KeyEncryptionKeyIdentity; @@ -60,11 +60,11 @@ model CustomerManagedKeyEncryption { /** (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. */ @added(Versions.v4) @encodedName("application/json", "encryption") -model Encryption { +model encryption { /** Values are enabled and disabled. */ infrastructureEncryption?: InfrastructureEncryption; /** All Customer-managed key encryption properties for the resource. */ @added(Versions.v4) - customerManagedKeyEncryption?: CustomerManagedKeyEncryption; + customerManagedKeyEncryption?: customerManagedKeyEncryption; } diff --git a/packages/typespec-azure-resource-manager/lib/common-types/managed-identity.tsp b/packages/typespec-azure-resource-manager/lib/common-types/managed-identity.tsp index 6419322dc2..f6e3a491ff 100644 --- a/packages/typespec-azure-resource-manager/lib/common-types/managed-identity.tsp +++ b/packages/typespec-azure-resource-manager/lib/common-types/managed-identity.tsp @@ -48,13 +48,13 @@ model SystemAssignedServiceIdentity { * User assigned identity properties */ model UserAssignedIdentity { - /** The client ID of the assigned identity. */ - @visibility("read") - clientId?: uuid; - /** The principal ID of the assigned identity. */ @visibility("read") principalId?: uuid; + + /** The client ID of the assigned identity. */ + @visibility("read") + clientId?: uuid; } /** diff --git a/packages/typespec-azure-resource-manager/lib/common-types/private-links.tsp b/packages/typespec-azure-resource-manager/lib/common-types/private-links.tsp index 92526d6e5a..593d7ecbe4 100644 --- a/packages/typespec-azure-resource-manager/lib/common-types/private-links.tsp +++ b/packages/typespec-azure-resource-manager/lib/common-types/private-links.tsp @@ -6,9 +6,9 @@ using Azure.Core; namespace Azure.ResourceManager.CommonTypes; -/** The Private Endpoint resource. */ +/** The private endpoint resource. */ model PrivateEndpoint { - /** The resource identifier for private endpoint */ + /** The resource identifier of the private endpoint */ @visibility("read") @typeChangedFrom(CommonTypes.Versions.v4, string) id?: Azure.Core.armResourceIdentifier; @@ -43,7 +43,7 @@ model PrivateLinkResourceListResult { /** URL to get the next set of operation list results (if there are any). */ @visibility("read") - nextLink?: string; + nextLink?: url; } //#region /** The private endpoint connection resource */ @@ -61,7 +61,7 @@ model PrivateEndpointConnectionListResult { /** URL to get the next set of operation list results (if there are any). */ @visibility("read") - nextLink?: string; + nextLink?: url; } /** Properties of the private endpoint connection. */ @@ -113,7 +113,7 @@ union PrivateEndpointConnectionProvisioningState { /** The private endpoint connection status. */ union PrivateEndpointServiceConnectionStatus { - /** Connectionaiting for approval or rejection */ + /** Connection waiting for approval or rejection */ Pending: "Pending", /** Connection approved */ diff --git a/packages/typespec-azure-resource-manager/lib/common-types/types-ref.tsp b/packages/typespec-azure-resource-manager/lib/common-types/types-ref.tsp index 455b00e80f..083686a42e 100644 --- a/packages/typespec-azure-resource-manager/lib/common-types/types-ref.tsp +++ b/packages/typespec-azure-resource-manager/lib/common-types/types-ref.tsp @@ -173,10 +173,10 @@ namespace Azure.ResourceManager.CommonTypes; /** * locationData */ -@@armCommonDefinition(LocationData, "locationData", Azure.ResourceManager.CommonTypes.Versions.v3); -@@armCommonDefinition(LocationData, "locationData", Azure.ResourceManager.CommonTypes.Versions.v4); -@@armCommonDefinition(LocationData, "locationData", Azure.ResourceManager.CommonTypes.Versions.v5); -@@armCommonDefinition(LocationData, "locationData", Azure.ResourceManager.CommonTypes.Versions.v6); +@@armCommonDefinition(locationData, "locationData", Azure.ResourceManager.CommonTypes.Versions.v3); +@@armCommonDefinition(locationData, "locationData", Azure.ResourceManager.CommonTypes.Versions.v4); +@@armCommonDefinition(locationData, "locationData", Azure.ResourceManager.CommonTypes.Versions.v5); +@@armCommonDefinition(locationData, "locationData", Azure.ResourceManager.CommonTypes.Versions.v6); /** * The error detail. @@ -216,10 +216,10 @@ namespace Azure.ResourceManager.CommonTypes; /** * Metadata pertaining to creation and last modification of the resource. */ -@@armCommonDefinition(SystemData, "systemData", Azure.ResourceManager.CommonTypes.Versions.v3); -@@armCommonDefinition(SystemData, "systemData", Azure.ResourceManager.CommonTypes.Versions.v4); -@@armCommonDefinition(SystemData, "systemData", Azure.ResourceManager.CommonTypes.Versions.v5); -@@armCommonDefinition(SystemData, "systemData", Azure.ResourceManager.CommonTypes.Versions.v6); +@@armCommonDefinition(systemData, "systemData", Azure.ResourceManager.CommonTypes.Versions.v3); +@@armCommonDefinition(systemData, "systemData", Azure.ResourceManager.CommonTypes.Versions.v4); +@@armCommonDefinition(systemData, "systemData", Azure.ResourceManager.CommonTypes.Versions.v5); +@@armCommonDefinition(systemData, "systemData", Azure.ResourceManager.CommonTypes.Versions.v6); /** * Details of the resource plan. @@ -232,19 +232,19 @@ namespace Azure.ResourceManager.CommonTypes; /** * encryptionProperties */ -@@armCommonDefinition(EncryptionProperties, +@@armCommonDefinition(encryptionProperties, "encryptionProperties", Azure.ResourceManager.CommonTypes.Versions.v3 ); -@@armCommonDefinition(EncryptionProperties, +@@armCommonDefinition(encryptionProperties, "encryptionProperties", Azure.ResourceManager.CommonTypes.Versions.v4 ); -@@armCommonDefinition(EncryptionProperties, +@@armCommonDefinition(encryptionProperties, "encryptionProperties", Azure.ResourceManager.CommonTypes.Versions.v5 ); -@@armCommonDefinition(EncryptionProperties, +@@armCommonDefinition(encryptionProperties, "encryptionProperties", Azure.ResourceManager.CommonTypes.Versions.v6 ); diff --git a/packages/typespec-azure-resource-manager/lib/common-types/types.tsp b/packages/typespec-azure-resource-manager/lib/common-types/types.tsp index 9c37ff86ab..c8ccf4002c 100644 --- a/packages/typespec-azure-resource-manager/lib/common-types/types.tsp +++ b/packages/typespec-azure-resource-manager/lib/common-types/types.tsp @@ -23,7 +23,7 @@ model Resource { /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @visibility("read") - systemData?: SystemData; + systemData?: systemData; } /** The resource model definition for an Azure Resource Manager resource with an etag. */ @@ -299,7 +299,7 @@ model ErrorAdditionalInfo { /** * Metadata pertaining to creation and last modification of the resource. */ -model SystemData { +model systemData { /** The identity that created the resource. */ createdBy?: string; @@ -440,7 +440,7 @@ union EncryptionStatus { /** * Configuration of key for data encryption */ -model EncryptionProperties { +model encryptionProperties { /** Indicates whether or not the encryption is enabled for container registry. */ status?: EncryptionStatus; @@ -451,7 +451,7 @@ model EncryptionProperties { /** * Metadata pertaining to the geographic location of the resource. */ -model LocationData { +model locationData { /** A canonical name for the geographic or physical location. */ @maxLength(256) name: string; @@ -518,6 +518,7 @@ model SubscriptionIdParameter { @typeChangedFrom(Versions.v4, string) @path @segment("subscriptions") + @minLength(1) subscriptionId: uuid; } diff --git a/packages/typespec-azure-resource-manager/lib/foundations/backcompat.tsp b/packages/typespec-azure-resource-manager/lib/foundations/backcompat.tsp index e8b0595352..56e394e78e 100644 --- a/packages/typespec-azure-resource-manager/lib/foundations/backcompat.tsp +++ b/packages/typespec-azure-resource-manager/lib/foundations/backcompat.tsp @@ -30,7 +30,7 @@ namespace Azure.ResourceManager.Foundations { alias Origin = CommonTypes.Origin; alias ErrorDetail = CommonTypes.ErrorDetail; alias ErrorAdditionalInfo = CommonTypes.ErrorAdditionalInfo; - alias SystemData = CommonTypes.SystemData; + alias SystemData = CommonTypes.systemData; alias createdByType = CommonTypes.createdByType; alias Plan = CommonTypes.Plan; alias CheckNameAvailabilityRequest = CommonTypes.CheckNameAvailabilityRequest; diff --git a/website/src/content/docs/docs/libraries/azure-resource-manager/reference/data-types.md b/website/src/content/docs/docs/libraries/azure-resource-manager/reference/data-types.md index 965fab6db9..b4f981549b 100644 --- a/website/src/content/docs/docs/libraries/azure-resource-manager/reference/data-types.md +++ b/website/src/content/docs/docs/libraries/azure-resource-manager/reference/data-types.md @@ -428,7 +428,7 @@ model Foo is TrackedResource { | Name | Type | Description | | ---------- | ---------------------------------------------------------------------------- | -------------------------------------------- | -| encryption | [`Encryption`](./data-types.md#Azure.ResourceManager.CommonTypes.Encryption) | All encryption configuration for a resource. | +| encryption | [`encryption`](./data-types.md#Azure.ResourceManager.CommonTypes.encryption) | All encryption configuration for a resource. | ### `EntityTagProperty` {#Azure.ResourceManager.EntityTagProperty} @@ -1092,12 +1092,12 @@ model Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse | reason? | [`CheckNameAvailabilityReason`](./data-types.md#Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason) | The reason why the given name is not available. | | message? | `string` | Detailed reason why the given name is not available. | -### `CustomerManagedKeyEncryption` {#Azure.ResourceManager.CommonTypes.CustomerManagedKeyEncryption} +### `customerManagedKeyEncryption` {#Azure.ResourceManager.CommonTypes.customerManagedKeyEncryption} Customer-managed key encryption properties for the resource. ```typespec -model Azure.ResourceManager.CommonTypes.CustomerManagedKeyEncryption +model Azure.ResourceManager.CommonTypes.customerManagedKeyEncryption ``` #### Properties @@ -1138,12 +1138,12 @@ model Azure.ResourceManager.CommonTypes.DelegatedResources | ---- | ------------------------------------------------------------------------------------------ | --------------------- | | | [`DelegatedResource`](./data-types.md#Azure.ResourceManager.CommonTypes.DelegatedResource) | Additional properties | -### `Encryption` {#Azure.ResourceManager.CommonTypes.Encryption} +### `encryption` {#Azure.ResourceManager.CommonTypes.encryption} (Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled. ```typespec -model Azure.ResourceManager.CommonTypes.Encryption +model Azure.ResourceManager.CommonTypes.encryption ``` #### Properties @@ -1151,14 +1151,14 @@ model Azure.ResourceManager.CommonTypes.Encryption | Name | Type | Description | | ----------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | infrastructureEncryption? | [`InfrastructureEncryption`](./data-types.md#Azure.ResourceManager.CommonTypes.InfrastructureEncryption) | Values are enabled and disabled. | -| customerManagedKeyEncryption? | [`CustomerManagedKeyEncryption`](./data-types.md#Azure.ResourceManager.CommonTypes.CustomerManagedKeyEncryption) | All Customer-managed key encryption properties for the resource. | +| customerManagedKeyEncryption? | [`customerManagedKeyEncryption`](./data-types.md#Azure.ResourceManager.CommonTypes.customerManagedKeyEncryption) | All Customer-managed key encryption properties for the resource. | -### `EncryptionProperties` {#Azure.ResourceManager.CommonTypes.EncryptionProperties} +### `encryptionProperties` {#Azure.ResourceManager.CommonTypes.encryptionProperties} Configuration of key for data encryption ```typespec -model Azure.ResourceManager.CommonTypes.EncryptionProperties +model Azure.ResourceManager.CommonTypes.encryptionProperties ``` #### Properties @@ -1316,12 +1316,12 @@ model Azure.ResourceManager.CommonTypes.KeyVaultProperties | keyIdentifier? | `string` | Key vault uri to access the encryption key. | | identity? | `string` | The client ID of the identity which will be used to access key vault. | -### `LocationData` {#Azure.ResourceManager.CommonTypes.LocationData} +### `locationData` {#Azure.ResourceManager.CommonTypes.locationData} Metadata pertaining to the geographic location of the resource. ```typespec -model Azure.ResourceManager.CommonTypes.LocationData +model Azure.ResourceManager.CommonTypes.locationData ``` #### Properties @@ -1635,7 +1635,7 @@ model Azure.ResourceManager.CommonTypes.Plan ### `PrivateEndpoint` {#Azure.ResourceManager.CommonTypes.PrivateEndpoint} -The Private Endpoint resource. +The private endpoint resource. ```typespec model Azure.ResourceManager.CommonTypes.PrivateEndpoint @@ -1643,9 +1643,9 @@ model Azure.ResourceManager.CommonTypes.PrivateEndpoint #### Properties -| Name | Type | Description | -| ---- | ---------------------------- | -------------------------------------------- | -| id? | `Core.armResourceIdentifier` | The resource identifier for private endpoint | +| Name | Type | Description | +| ---- | ---------------------------- | ----------------------------------------------- | +| id? | `Core.armResourceIdentifier` | The resource identifier of the private endpoint | ### `PrivateEndpointConnection` {#Azure.ResourceManager.CommonTypes.PrivateEndpointConnection} @@ -1674,7 +1674,7 @@ model Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionListResult | Name | Type | Description | | --------- | --------------------------------------------------------- | --------------------------------------------------------------------- | | value? | `ResourceManager.CommonTypes.PrivateEndpointConnection[]` | Array of private endpoint connections. | -| nextLink? | `string` | URL to get the next set of operation list results (if there are any). | +| nextLink? | `url` | URL to get the next set of operation list results (if there are any). | ### `PrivateEndpointConnectionListResultV5` {#Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionListResultV5} @@ -1786,7 +1786,7 @@ model Azure.ResourceManager.CommonTypes.PrivateLinkResourceListResult | Name | Type | Description | | --------- | --------------------------------------------------- | --------------------------------------------------------------------- | | value? | `ResourceManager.CommonTypes.PrivateLinkResource[]` | Array of private link resources | -| nextLink? | `string` | URL to get the next set of operation list results (if there are any). | +| nextLink? | `url` | URL to get the next set of operation list results (if there are any). | ### `PrivateLinkResourceListResultV5` {#Azure.ResourceManager.CommonTypes.PrivateLinkResourceListResultV5} @@ -1944,7 +1944,7 @@ model Azure.ResourceManager.CommonTypes.Resource | id? | `Core.armResourceIdentifier` | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} | | name? | `string` | The name of the resource | | type? | `Core.armResourceType` | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | -| systemData? | [`SystemData`](./data-types.md#Azure.ResourceManager.CommonTypes.SystemData) | Azure Resource Manager metadata containing createdBy and modifiedBy information. | +| systemData? | [`systemData`](./data-types.md#Azure.ResourceManager.CommonTypes.systemData) | Azure Resource Manager metadata containing createdBy and modifiedBy information. | ### `ResourceAssociation` {#Azure.ResourceManager.CommonTypes.ResourceAssociation} @@ -2056,12 +2056,12 @@ model Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentity | tenantId? | `Core.uuid` | The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. | | type | [`SystemAssignedServiceIdentityType`](./data-types.md#Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentityType) | The type of managed identity assigned to this resource. | -### `SystemData` {#Azure.ResourceManager.CommonTypes.SystemData} +### `systemData` {#Azure.ResourceManager.CommonTypes.systemData} Metadata pertaining to creation and last modification of the resource. ```typespec -model Azure.ResourceManager.CommonTypes.SystemData +model Azure.ResourceManager.CommonTypes.systemData ``` #### Properties @@ -2134,8 +2134,8 @@ model Azure.ResourceManager.CommonTypes.UserAssignedIdentity | Name | Type | Description | | ------------ | ----------- | ------------------------------------------ | -| clientId? | `Core.uuid` | The client ID of the assigned identity. | | principalId? | `Core.uuid` | The principal ID of the assigned identity. | +| clientId? | `Core.uuid` | The client ID of the assigned identity. | ### `ResourceHome` {#Azure.ResourceManager.CommonTypes.ResourceHome} diff --git a/website/src/content/docs/docs/libraries/azure-resource-manager/reference/index.mdx b/website/src/content/docs/docs/libraries/azure-resource-manager/reference/index.mdx index 55da9b7af0..7642e643c8 100644 --- a/website/src/content/docs/docs/libraries/azure-resource-manager/reference/index.mdx +++ b/website/src/content/docs/docs/libraries/azure-resource-manager/reference/index.mdx @@ -173,11 +173,11 @@ npm install --save-peer @azure-tools/typespec-azure-resource-manager - [`AzureEntityResource`](./data-types.md#Azure.ResourceManager.CommonTypes.AzureEntityResource) - [`CheckNameAvailabilityRequest`](./data-types.md#Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest) - [`CheckNameAvailabilityResponse`](./data-types.md#Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse) -- [`CustomerManagedKeyEncryption`](./data-types.md#Azure.ResourceManager.CommonTypes.CustomerManagedKeyEncryption) +- [`customerManagedKeyEncryption`](./data-types.md#Azure.ResourceManager.CommonTypes.customerManagedKeyEncryption) - [`DelegatedResource`](./data-types.md#Azure.ResourceManager.CommonTypes.DelegatedResource) - [`DelegatedResources`](./data-types.md#Azure.ResourceManager.CommonTypes.DelegatedResources) -- [`Encryption`](./data-types.md#Azure.ResourceManager.CommonTypes.Encryption) -- [`EncryptionProperties`](./data-types.md#Azure.ResourceManager.CommonTypes.EncryptionProperties) +- [`encryption`](./data-types.md#Azure.ResourceManager.CommonTypes.encryption) +- [`encryptionProperties`](./data-types.md#Azure.ResourceManager.CommonTypes.encryptionProperties) - [`ErrorAdditionalInfo`](./data-types.md#Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo) - [`ErrorDetail`](./data-types.md#Azure.ResourceManager.CommonTypes.ErrorDetail) - [`ErrorResponse`](./data-types.md#Azure.ResourceManager.CommonTypes.ErrorResponse) @@ -188,7 +188,7 @@ npm install --save-peer @azure-tools/typespec-azure-resource-manager - [`IfNoneMatchHeader`](./data-types.md#Azure.ResourceManager.CommonTypes.IfNoneMatchHeader) - [`KeyEncryptionKeyIdentity`](./data-types.md#Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentity) - [`KeyVaultProperties`](./data-types.md#Azure.ResourceManager.CommonTypes.KeyVaultProperties) -- [`LocationData`](./data-types.md#Azure.ResourceManager.CommonTypes.LocationData) +- [`locationData`](./data-types.md#Azure.ResourceManager.CommonTypes.locationData) - [`LocationParameter`](./data-types.md#Azure.ResourceManager.CommonTypes.LocationParameter) - [`LocationResourceParameter`](./data-types.md#Azure.ResourceManager.CommonTypes.LocationResourceParameter) - [`ManagedOnBehalfOfConfiguration`](./data-types.md#Azure.ResourceManager.CommonTypes.ManagedOnBehalfOfConfiguration) @@ -231,7 +231,7 @@ npm install --save-peer @azure-tools/typespec-azure-resource-manager - [`Sku`](./data-types.md#Azure.ResourceManager.CommonTypes.Sku) - [`SubscriptionIdParameter`](./data-types.md#Azure.ResourceManager.CommonTypes.SubscriptionIdParameter) - [`SystemAssignedServiceIdentity`](./data-types.md#Azure.ResourceManager.CommonTypes.SystemAssignedServiceIdentity) -- [`SystemData`](./data-types.md#Azure.ResourceManager.CommonTypes.SystemData) +- [`systemData`](./data-types.md#Azure.ResourceManager.CommonTypes.systemData) - [`TenantIdParameter`](./data-types.md#Azure.ResourceManager.CommonTypes.TenantIdParameter) - [`TrackedResource`](./data-types.md#Azure.ResourceManager.CommonTypes.TrackedResource) - [`UserAssignedIdentities`](./data-types.md#Azure.ResourceManager.CommonTypes.UserAssignedIdentities)