Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
}],
"smallImage": "\\\\Images\\\\smallImage",
"mediumImage": "\\\\Images\\\\MediumImage",
"largeImage": "\\\\Images\\\\LargeImage"
"largeImage": "\\\\Images\\\\LargeImage",
"isActivity": false
}
}
},
Expand Down Expand Up @@ -66,7 +67,8 @@
"typeName": "TestInteractionType6358",
"largeImage": "\\\\Images\\\\LargeImage",
"mediumImage": "\\\\Images\\\\MediumImage",
"smallImage": "\\\\Images\\\\smallImage"
"smallImage": "\\\\Images\\\\smallImage",
"isActivity": false
},
"type": "Microsoft.CustomerInsights/hubs/interactions"
}
Expand Down
39 changes: 36 additions & 3 deletions arm-customer-insights/2017-01-01/examples/InteractionsGet.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"isLocalizedString": false,
"isName": false,
"isRequired": true,
"propertyId": "id1"
"propertyId": "id1",
"dataSourcePrecedenceRules": []
},
{
"fieldName": "profile1",
Expand All @@ -38,15 +39,47 @@
"isLocalizedString": false,
"isName": false,
"isRequired": true,
"propertyId": "id1"
"propertyId": "id1",
"dataSourcePrecedenceRules": [
{
"dataSource": {
"dataSourceReferenceId": "70",
"dataSourceType": "Connector",
"name": "crm2",
"status": "Active",
"id": 1
},
"precedence": 50
}
]
}],
"instancesCount": 0,
"provisioningState": "Provisioning",
"tenantId": "azsdktesthub",
"typeName": "TestInteractionType6358",
"largeImage": "\\\\Images\\\\LargeImage",
"mediumImage": "\\\\Images\\\\MediumImage",
"smallImage": "\\\\Images\\\\smallImage"
"smallImage": "\\\\Images\\\\smallImage",
"defaultDataSource": {
"dataSourceReferenceId": "70",
"dataSourceType": "Connector",
"name": "crm2",
"status": "Active",
"id": 1
},
"dataSourcePrecedenceRules": [
{
"dataSource": {
"dataSourceReferenceId": "70",
"dataSourceType": "Connector",
"name": "crm2",
"status": "Active",
"id": 1
},
"precedence": 50
}
],
"isActivity": true
},
"type": "Microsoft.CustomerInsights/hubs/interactions"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"isLocalizedString": false,
"isName": false,
"isRequired": true,
"propertyId": "id1"
"propertyId": "id1",
"dataSourcePrecedenceRules": []
},
{
"fieldName": "profile1",
Expand All @@ -38,15 +39,47 @@
"isLocalizedString": false,
"isName": false,
"isRequired": true,
"propertyId": "id1"
"propertyId": "id1",
"dataSourcePrecedenceRules": [
{
"dataSource": {
"dataSourceReferenceId": "70",
"dataSourceType": "Connector",
"name": "crm2",
"status": "Active",
"id": 1
},
"precedence": 50
}
]
}],
"instancesCount": 0,
"provisioningState": "Provisioning",
"tenantId": "azsdktesthub",
"typeName": "TestInteractionType6358",
"largeImage": "\\\\Images\\\\LargeImage",
"mediumImage": "\\\\Images\\\\MediumImage",
"smallImage": "\\\\Images\\\\smallImage"
"smallImage": "\\\\Images\\\\smallImage",
"defaultDataSource": {
"dataSourceReferenceId": "70",
"dataSourceType": "Connector",
"name": "crm2",
"status": "Active",
"id": 1
},
"dataSourcePrecedenceRules": [
{
"dataSource": {
"dataSourceReferenceId": "70",
"dataSourceType": "Connector",
"name": "crm2",
"status": "Active",
"id": 1
},
"precedence": 50
}
],
"isActivity": true
},
"type": "Microsoft.CustomerInsights/hubs/interactions"
}]
Expand Down
64 changes: 48 additions & 16 deletions arm-customer-insights/2017-01-01/swagger/customer-insights.json
Original file line number Diff line number Diff line change
Expand Up @@ -3433,6 +3433,14 @@
"isAvailableInGraph": {
"type": "boolean",
"description": "Whether property is available in graph or not."
},
"dataSourcePrecedenceRules": {
"type": "array",
"items": {
"$ref": "#/definitions/DataSourcePrecedence"
},
"readOnly": true,
"description": "This is specific to interactions modeled as activities. Data sources are used to determine where data is stored and also in precedence rules."
}
},
"description": "Property definition."
Expand Down Expand Up @@ -4226,9 +4234,6 @@
"description": "Resource tags."
}
},
"required": [
"location"
],
"x-ms-azure-resource": true,
"description": "Common properties of Azure resource."
},
Expand Down Expand Up @@ -4765,17 +4770,17 @@
"type": "string",
"description": "The primary participant property name for an interaction ,This is used to logically represent the agent of the interaction, Specify the participant name here from ParticipantName."
},
"dataSources": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing/renaming a property is a breaking change (has the service made a breaking change?) and may result in SDK breaking changes, is this intentional for this api-version?
similar comment applies to other changes made to this api-version, please provide additional context on the changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this is intentional and it's OK because the 2017-01-01 version never get released before. Last time when we update this swagger, this part was a work-in-progress. Now that it's done and it should look like this (when you call this API with 2017-01-01 version, this is what the returned schema looks like)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the current spec does not match the wire, meaning that it was initially incorrect, then it may be ok corrected (though for anyone who shipped it avoiding a breaking change is best). Regarding your statement about "201-01-01 version never get released before", what do you mean by this?
Having the swagger spec in master of this repo, means anyone could generate an SDK, I see there's an SDK for Go at https://github.com/Azure/azure-sdk-for-go/tree/master/arm/customer-insights.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi sorry looks like it's released before. However this part was incomplete so I'm sure no one was using it. Anyway the version 2017-01-01 should look like this swagger now

"dataSourcePrecedenceRules": {
"type": "array",
"items": {
"$ref": "#/definitions/DataSource"
"$ref": "#/definitions/DataSourcePrecedence"
},
"readOnly": true,
"description": "This is specific to interactions modeled as activities. Data sources are used to determine where data is stored and also in precedence rules."
},
"defaultDataSourceId": {
"type": "string",
"readOnly": true,
"defaultDataSource": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/DataSource",
"description": "Default data source is specifically used in cases where data source is not specified in an instance."
},
"isActivity": {
Expand All @@ -4786,10 +4791,15 @@
},
"DataSource": {
"properties": {
"name": {
"type": "string",
"readOnly": true,
"description": "The data source name"
},
"dataSourceType": {
"type": "string",
"enum": [
"ConnectorMapping",
"Connector",
"LinkInteraction",
"SystemDefault"
],
Expand All @@ -4800,24 +4810,46 @@
"readOnly": true,
"description": "The data source type."
},
"id": {
"status": {
"type": "string",
"enum": [
"None",
"Active",
"Deleted"
],
"x-ms-enum": {
"name": "Status",
"modelAsString": true
},
"readOnly": true,
"description": "The data source ID."
"description": "The data source status."
},
"linkId": {
"type": "string",
"id": {
"type": "integer",
"readOnly": true,
"description": "The Link ID if the data source type is LinkInteraction."
"description": "The data source ID."
},
"connectorMappingId": {
"dataSourceReferenceId": {
"type": "string",
"readOnly": true,
"description": "The Connector Mapping ID if the data source type is ConnectorMapping."
"description": "The data source reference id."
}
},
"description": "Data Source is a way for us to know the source of instances. A single type can have data coming in from multiple places. In activities we use this to determine precedence rules."
},
"DataSourcePrecedence": {
"properties": {
"dataSource": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/DataSource"
},
"precedence": {
"type": "integer",
"description": "the precedence value."
}
},
"description": "The data source precedence is a way to know the precedence of each data source."
},
"StrongId": {
"required": [
"keyPropertyNames",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"parameters": {
"hubName": "azSdkTestHub",
"resourceGroupName": "TestHubRG",
"authorizationPolicyName": "testPolicy4222",
"api-version": "2016-01-01",
"subscriptionId": "subid",
"parameters": {
"properties": {
"permissions": ["Read",
"Write",
"Manage"]
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups//TestHubRG/providers/Microsoft.CustomerInsights/hubs/azSdkTestHub/AuthorizationPolicies/testPolicy4222",
"name": "testPolicy4222",
"type": "Microsoft.CustomerInsights/hubs/AuthorizationPolicies",
"properties": {
"permissions": ["Read",
"Write",
"Manage"],
"policyName": "testPolicy4222",
"primaryKey": "cHJpbWFyeVRlc3RSZWFk",
"secondaryKey": "c2Vjb25kYXJ5VGVzdFJlYWQ="
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups//TestHubRG/providers/Microsoft.CustomerInsights/hubs/azSdkTestHub/AuthorizationPolicies/testPolicy4222",
"name": "testPolicy4222",
"type": "Microsoft.CustomerInsights/hubs/AuthorizationPolicies",
"properties": {
"permissions": ["Read",
"Write",
"Manage"],
"policyName": "testPolicy4222",
"primaryKey": "cHJpbWFyeVRlc3RSZWFk",
"secondaryKey": "c2Vjb25kYXJ5VGVzdFJlYWQ="
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"hubName": "azSdkTestHub",
"resourceGroupName": "TestHubRG",
"authorizationPolicyName": "testPolicy4222",
"api-version": "2016-01-01",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/azSdkTestHub/AuthorizationPolicies/testPolicy4222",
"name": "azSdkTestHub/testPolicy4222",
"properties": {
"permissions": ["Read",
"Write",
"Manage"],
"policyName": "testPolicy4222",
"primaryKey": "cHJpbWFyeVRlc3RSZWFk",
"secondaryKey": "c2Vjb25kYXJ5VGVzdFJlYWQ="
},
"type": "Microsoft.CustomerInsights/hubs/AuthorizationPolicies"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"hubName": "azSdkTestHub",
"resourceGroupName": "TestHubRG",
"api-version": "2016-01-01",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"value": [{
"id": "/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/azSdkTestHub/AuthorizationPolicies/RootManageSharedAccessKey",
"name": "azSdkTestHub/RootManageSharedAccessKey",
"properties": {
"permissions": ["Read",
"Write",
"Manage"],
"policyName": "RootManageSharedAccessKey",
"primaryKey": "KEvPnaBbDbEdSch27GhFx/D5Smu1bZC8bCmG33fHyi4=",
"secondaryKey": "wvOahlAtWZh9127MVr1yYX2pPgioqFWGEUtp1ADbfcQ="
},
"type": "Microsoft.CustomerInsights/hubs/AuthorizationPolicies"
},
{
"id": "/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/azSdkTestHub/AuthorizationPolicies/testPolicy1125",
"name": "azSdkTestHub/testPolicy1125",
"properties": {
"permissions": ["Read",
"Write",
"Manage"],
"policyName": "testPolicy1125",
"primaryKey": "3Nk5Yce0eQXHY3S+KDuUPKFS5NkOWLqtzNYEadh1WeI=",
"secondaryKey": "c2Vjb25kYXJ5VGVzdFJlYWQ="
},
"type": "Microsoft.CustomerInsights/hubs/AuthorizationPolicies"
}]
}
}
}
}
Loading