From e185789eec7f72d9c827aa724c11cb83b12fd81d Mon Sep 17 00:00:00 2001 From: Jingshu923 <52914166+Jingshu923@users.noreply.github.com> Date: Wed, 12 May 2021 09:08:38 +0800 Subject: [PATCH] [DataFactory] Improve enum with object type in LS and DS swagger (#14160) * [DataFactory] Improve enum with object type in LS and DS swagger * Add 1 change * Update 2 * Fix errors * Revert "Fix errors" This reverts commit b94a5f3570d1f39cf275c081ae73303e802f002e. * Fix one * Fix comments --- .../2018-06-01/entityTypes/Dataset.json | 74 +++++---- .../2018-06-01/entityTypes/LinkedService.json | 142 +++++++----------- .../2018-06-01/entityTypes/Pipeline.json | 24 +-- 3 files changed, 104 insertions(+), 136 deletions(-) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Dataset.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Dataset.json index 8e94ced10fe3..d403dc5bc04d 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Dataset.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Dataset.json @@ -385,8 +385,8 @@ ], "properties": { "filePattern": { - "description": "File pattern of JSON. To be more specific, the way of separating a collection of JSON objects. The default value is 'setOfObjects'. It is case-sensitive.", - "$ref": "#/definitions/JsonFormatFilePattern" + "type": "object", + "description": "File pattern of JSON. To be more specific, the way of separating a collection of JSON objects. The default value is 'setOfObjects'. It is case-sensitive." }, "nestingSeparator": { "type": "object", @@ -408,7 +408,7 @@ }, "JsonFormatFilePattern": { "description": "JSON format file pattern. A property of JsonFormat.", - "type": "object", + "type": "string", "enum": [ "setOfObjects", "arrayOfObjects" @@ -484,8 +484,8 @@ ], "properties": { "level": { - "description": "The GZip compression level.", - "$ref": "#/definitions/CompressionLevel" + "type": "object", + "description": "The GZip compression level." } } }, @@ -500,8 +500,8 @@ ], "properties": { "level": { - "description": "The Deflate compression level.", - "$ref": "#/definitions/CompressionLevel" + "type": "object", + "description": "The Deflate compression level." } } }, @@ -516,8 +516,8 @@ ], "properties": { "level": { - "description": "The ZipDeflate compression level.", - "$ref": "#/definitions/CompressionLevel" + "type": "object", + "description": "The ZipDeflate compression level." } } }, @@ -543,15 +543,15 @@ ], "properties": { "level": { - "description": "The TarGZip compression level.", - "$ref": "#/definitions/CompressionLevel" + "type": "object", + "description": "The TarGZip compression level." } } }, "CompressionLevel": { "title": "Microsoft.Azure.Management.DataFactories.Models.CompressionLevel", "description": "All available compression levels.", - "type": "object", + "type": "string", "enum": [ "Optimal", "Fastest" @@ -748,16 +748,7 @@ }, "compressionCodec": { "type": "object", - "enum": [ - "none", - "gzip", - "snappy", - "lzo" - ], - "x-ms-enum": { - "name": "compressionCodec", - "modelAsString": true - } + "description": "The data compressionCodec. Type: string (or Expression with resultType string)." } }, "required": [ @@ -802,24 +793,11 @@ }, "compressionCodec": { "type": "object", - "enum": [ - "bzip2", - "gzip", - "deflate", - "zipDeflate", - "snappy", - "lz4", - "tar", - "tarGZip" - ], - "x-ms-enum": { - "name": "compressionCodec", - "modelAsString": true - } + "description": "The data compressionCodec. Type: string (or Expression with resultType string)." }, "compressionLevel": { - "description": "The data compression method used for DelimitedText.", - "$ref": "#/definitions/CompressionLevel" + "type": "object", + "description": "The data compression method used for DelimitedText." }, "quoteChar": { "type": "object", @@ -842,6 +820,26 @@ "location" ] }, + "CompressionCodec": { + "description": "All available compressionCodec values.", + "type": "string", + "enum": [ + "none", + "lzo", + "bzip2", + "gzip", + "deflate", + "zipDeflate", + "snappy", + "lz4", + "tar", + "tarGZip" + ], + "x-ms-enum": { + "name": "CompressionCodec", + "modelAsString": true + } + }, "JsonDataset": { "x-ms-discriminator-value": "Json", "description": "Json dataset.", diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json index 8190250e9fd7..71f9d12270d8 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json @@ -635,14 +635,6 @@ "description": "Dynamics linked service properties.", "properties": { "deploymentType": { - "x-ms-enum": { - "name": "DynamicsDeploymentType", - "modelAsString": true - }, - "enum": [ - "Online", - "OnPremisesWithIfd" - ], "type": "object", "description": "The deployment type of the Dynamics instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for Dynamics on-premises with Ifd. Type: string (or Expression with resultType string)." }, @@ -663,15 +655,6 @@ "description": "The organization name of the Dynamics instance. The property is required for on-prem and required for online when there are more than one Dynamics instances associated with the user. Type: string (or Expression with resultType string)." }, "authenticationType": { - "x-ms-enum": { - "name": "DynamicsAuthenticationType", - "modelAsString": true - }, - "enum": [ - "Office365", - "Ifd", - "AADServicePrincipal" - ], "type": "object", "description": "The authentication type to connect to Dynamics server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string)." }, @@ -688,14 +671,6 @@ "description": "The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string)." }, "servicePrincipalCredentialType": { - "x-ms-enum": { - "name": "DynamicsServicePrincipalCredentialType", - "modelAsString": true - }, - "enum": [ - "ServicePrincipalKey", - "ServicePrincipalCert" - ], "type": "object", "description": "The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string)." }, @@ -713,6 +688,31 @@ "authenticationType" ] }, + "DynamicsDeploymentType": { + "description": "All available dynamicsDeploymentType values.", + "type": "string", + "enum": [ + "Online", + "OnPremisesWithIfd" + ], + "x-ms-enum": { + "name": "DynamicsDeploymentType", + "modelAsString": true + } + }, + "DynamicsAuthenticationType": { + "description": "All available dynamicsAuthenticationType values.", + "type": "string", + "enum": [ + "Office365", + "Ifd", + "AADServicePrincipal" + ], + "x-ms-enum": { + "name": "DynamicsAuthenticationType", + "modelAsString": true + } + }, "DynamicsCrmLinkedService": { "x-ms-discriminator-value": "DynamicsCrm", "description": "Dynamics CRM linked service.", @@ -737,15 +737,7 @@ "description": "Dynamics CRM linked service properties.", "properties": { "deploymentType": { - "x-ms-enum": { - "name": "DynamicsDeploymentType", - "modelAsString": true - }, - "enum": [ - "Online", - "OnPremisesWithIfd" - ], - "type": "string", + "type": "object", "description": "The deployment type of the Dynamics CRM instance. 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for Dynamics CRM on-premises with Ifd. Type: string (or Expression with resultType string)." }, "hostName": { @@ -765,16 +757,7 @@ "description": "The organization name of the Dynamics CRM instance. The property is required for on-prem and required for online when there are more than one Dynamics CRM instances associated with the user. Type: string (or Expression with resultType string)." }, "authenticationType": { - "x-ms-enum": { - "name": "DynamicsAuthenticationType", - "modelAsString": true - }, - "enum": [ - "Office365", - "Ifd", - "AADServicePrincipal" - ], - "type": "string", + "type": "object", "description": "The authentication type to connect to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario, 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string)." }, "username": { @@ -790,14 +773,6 @@ "description": "The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string)." }, "servicePrincipalCredentialType": { - "x-ms-enum": { - "name": "DynamicsServicePrincipalCredentialType", - "modelAsString": true - }, - "enum": [ - "ServicePrincipalKey", - "ServicePrincipalCert" - ], "type": "object", "description": "The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string)." }, @@ -815,6 +790,18 @@ "authenticationType" ] }, + "ServicePrincipalCredentialType": { + "description": "All available servicePrincipalCredentialType values.", + "type": "string", + "enum": [ + "ServicePrincipalKey", + "ServicePrincipalCert" + ], + "x-ms-enum": { + "name": "ServicePrincipalCredentialType", + "modelAsString": true + } + }, "CommonDataServiceForAppsLinkedService": { "x-ms-discriminator-value": "CommonDataServiceForApps", "description": "Common Data Service for Apps linked service.", @@ -839,15 +826,7 @@ "description": "Common Data Service for Apps linked service properties.", "properties": { "deploymentType": { - "x-ms-enum": { - "name": "DynamicsDeploymentType", - "modelAsString": true - }, - "enum": [ - "Online", - "OnPremisesWithIfd" - ], - "type": "string", + "type": "object", "description": "The deployment type of the Common Data Service for Apps instance. 'Online' for Common Data Service for Apps Online and 'OnPremisesWithIfd' for Common Data Service for Apps on-premises with Ifd. Type: string (or Expression with resultType string)." }, "hostName": { @@ -867,16 +846,7 @@ "description": "The organization name of the Common Data Service for Apps instance. The property is required for on-prem and required for online when there are more than one Common Data Service for Apps instances associated with the user. Type: string (or Expression with resultType string)." }, "authenticationType": { - "x-ms-enum": { - "name": "DynamicsAuthenticationType", - "modelAsString": true - }, - "enum": [ - "Office365", - "Ifd", - "AADServicePrincipal" - ], - "type": "string", + "type": "object", "description": "The authentication type to connect to Common Data Service for Apps server. 'Office365' for online scenario, 'Ifd' for on-premises with Ifd scenario. 'AADServicePrincipal' for Server-To-Server authentication in online scenario. Type: string (or Expression with resultType string)." }, "username": { @@ -892,14 +862,6 @@ "description": "The client ID of the application in Azure Active Directory used for Server-To-Server authentication. Type: string (or Expression with resultType string)." }, "servicePrincipalCredentialType": { - "x-ms-enum": { - "name": "DynamicsServicePrincipalCredentialType", - "modelAsString": true - }, - "enum": [ - "ServicePrincipalKey", - "ServicePrincipalCert" - ], "type": "object", "description": "The service principal credential type to use in Server-To-Server authentication. 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for certificate. Type: string (or Expression with resultType string)." }, @@ -5380,15 +5342,6 @@ "description": "The URI for the script action." }, "roles": { - "x-ms-enum": { - "name": "HdiNodeTypes", - "modelAsString": true - }, - "enum": [ - "Headnode", - "Workernode", - "Zookeeper" - ], "type": "object", "description": "The node types on which the script action should be executed." }, @@ -5403,6 +5356,19 @@ "roles" ] }, + "HdiNodeTypes": { + "description": "All available HdiNodeTypes values.", + "type": "string", + "enum": [ + "Headnode", + "Workernode", + "Zookeeper" + ], + "x-ms-enum": { + "name": "HdiNodeTypes", + "modelAsString": true + } + }, "AzureDataLakeAnalyticsLinkedService": { "x-ms-discriminator-value": "AzureDataLakeAnalytics", "description": "Azure Data Lake Analytics linked service.", diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json index dff6c6cb4dcf..b14de0ae25e1 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json @@ -1290,19 +1290,23 @@ ], "properties": { "filePattern": { - "description": "File pattern of JSON. This setting controls the way a collection of JSON objects will be treated. The default value is 'setOfObjects'. It is case-sensitive.", - "type": "string", - "enum": [ - "setOfObjects", - "arrayOfObjects" - ], - "x-ms-enum": { - "name": "JsonWriteFilePattern", - "modelAsString": true - } + "type": "object", + "description": "File pattern of JSON. This setting controls the way a collection of JSON objects will be treated. The default value is 'setOfObjects'. It is case-sensitive." } } }, + "JsonWriteFilePattern": { + "description": "All available filePatterns.", + "type": "string", + "enum": [ + "setOfObjects", + "arrayOfObjects" + ], + "x-ms-enum": { + "name": "JsonWriteFilePattern", + "modelAsString": true + } + }, "AvroSource": { "description": "A copy activity Avro source.", "type": "object",