Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Application Insights] Resolve duplicated definition names to fix track2 SDK generation error #13951

Merged
merged 21 commits into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
"properties": {
"identity": {
"description": "Identity used for BYOS",
"$ref": "#/definitions/ManagedIdentity"
"$ref": "#/definitions/MyWorkbookManagedIdentity"
},
"id": {
"type": "string",
Expand Down Expand Up @@ -512,11 +512,11 @@
}
}
},
"ManagedIdentity": {
"MyWorkbookManagedIdentity": {
"description": "Customer Managed Identity",
"properties": {
"userAssignedIdentities": {
"$ref": "#/definitions/UserAssignedIdentities"
"$ref": "#/definitions/MyWorkbookUserAssignedIdentities"
},
"type": {
"type": "string",
Expand All @@ -528,7 +528,7 @@
}
}
},
"UserAssignedIdentities": {
"MyWorkbookUserAssignedIdentities": {
"description": "Customer Managed Identity",
"properties": {
"principalId": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"swagger": "2.0",
"info": {
"title": "WorkbookClient",
"description": "Azure client for Workbook.",
"title": "ApplicationInsightsManagementClient",
"description": "Azure Application Insights client for web test based alerting.",
"version": "2020-10-20"
},
"host": "management.azure.com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
"properties": {
"identity": {
"description": "Identity used for BYOS",
"$ref": "#/definitions/ManagedIdentity"
"$ref": "#/definitions/WorkbookManagedIdentity"
},
"id": {
"type": "string",
Expand Down Expand Up @@ -577,11 +577,11 @@
}
}
},
"ManagedIdentity": {
"WorkbookManagedIdentity": {
"description": "Customer Managed Identity",
"properties": {
"userAssignedIdentities": {
"$ref": "#/definitions/UserAssignedIdentities"
"$ref": "#/definitions/WorkbookUserAssignedIdentities"
},
"type": {
"type": "string",
Expand All @@ -593,7 +593,7 @@
}
}
},
"UserAssignedIdentities": {
"WorkbookUserAssignedIdentities": {
"description": "Customer Managed Identity",
"properties": {
"principalId": {
Expand Down
136 changes: 56 additions & 80 deletions specification/applicationinsights/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ These are the global settings for the ApplicationInsights API.
title: ApplicationInsightsManagementClient
description: Composite Swagger for Application Insights Management Client
openapi-type: arm
tag: package-preview-2020-10
tag: package-preview-2020-06
```

### Suppression
Expand Down Expand Up @@ -206,6 +206,14 @@ directive:
where:
- $.definitions.DiagnosticServicesTokenResponse.properties.token
reason: 'Secrets are OK to return in a POST response.'
- suppress: DefaultErrorResponseSchema
from: aiOperations_API
reason: 'consistent with existing default error response | owned by another team'
- suppress: OperationsApiResponseSchema
from: aiOperations_API
reason: 'consistent with existing response schema | owned by another team'
- suppress: RequiredReadOnlySystemData

```

### Tag: package-preview-2021-03-only
Expand All @@ -216,55 +224,23 @@ These settings apply only when `--tag=package-preview-2021-03-only` is specified
input-file:
- Microsoft.Insights/preview/2021-03-03-preview/diagnosticServicesToken_API.json
```
### Tag: package-2020-02-12

These settings apply only when `--tag=package-2020-02-12` is specified on the command line.

``` yaml $(tag) == 'package-2020-02-12'
input-file:
- Microsoft.Insights/stable/2015-05-01/analyticsItems_API.json
- Microsoft.Insights/stable/2015-05-01/componentAnnotations_API.json
- Microsoft.Insights/stable/2015-05-01/componentApiKeys_API.json
- Microsoft.Insights/stable/2015-05-01/componentContinuousExport_API.json
- Microsoft.Insights/stable/2015-05-01/componentFeaturesAndPricing_API.json
- Microsoft.Insights/stable/2015-05-01/componentProactiveDetection_API.json
- Microsoft.Insights/stable/2015-05-01/components_API.json
- Microsoft.Insights/stable/2015-05-01/componentWorkItemConfigs_API.json
- Microsoft.Insights/stable/2015-05-01/favorites_API.json
- Microsoft.Insights/stable/2015-05-01/webTestLocations_API.json
- Microsoft.Insights/stable/2015-05-01/webTests_API.json
- Microsoft.Insights/stable/2020-10-20/myworkbooks_API.json
- Microsoft.Insights/stable/2020-10-20/workbooks_API.json
- Microsoft.Insights/stable/2020-10-20/workbookOperations_API.json
```

### Tag: package-2020-10-20
### Tag: package-2020-10-only

These settings apply only when `--tag=package-2020-10-20` is specified on the command line.
These settings apply only when `--tag=package-2020-10-only` is specified on the command line.

``` yaml $(tag) == 'package-2020-10-20'
```yaml $(tag) == 'package-2020-10-only'
input-file:
- Microsoft.Insights/stable/2015-05-01/analyticsItems_API.json
- Microsoft.Insights/stable/2015-05-01/componentAnnotations_API.json
- Microsoft.Insights/stable/2015-05-01/componentApiKeys_API.json
- Microsoft.Insights/stable/2015-05-01/componentContinuousExport_API.json
- Microsoft.Insights/stable/2015-05-01/componentFeaturesAndPricing_API.json
- Microsoft.Insights/stable/2015-05-01/componentProactiveDetection_API.json
- Microsoft.Insights/stable/2015-05-01/components_API.json
- Microsoft.Insights/stable/2015-05-01/componentWorkItemConfigs_API.json
- Microsoft.Insights/stable/2015-05-01/favorites_API.json
- Microsoft.Insights/stable/2015-05-01/webTestLocations_API.json
- Microsoft.Insights/stable/2015-05-01/webTests_API.json
- Microsoft.Insights/stable/2020-10-20/workbookOperations_API.json
- Microsoft.Insights/stable/2020-10-20/myworkbooks_API.json
- Microsoft.Insights/stable/2020-10-20/workbooks_API.json
- Microsoft.Insights/stable/2020-10-20/workbookOperations_API.json
```

### Tag: package-preview-2020-10
### Tag: package-preview-2020-10-only

These settings apply only when `--tag=package-preview-2020-10` is specified on the command line.
These settings apply only when `--tag=package-preview-2020-10-only` is specified on the command line.

```yaml $(tag) == 'package-preview-2020-10'
```yaml $(tag) == 'package-preview-2020-10-only'
input-file:
- Microsoft.Insights/preview/2020-10-05-preview/webTests_API.json
```
Expand Down Expand Up @@ -302,54 +278,54 @@ input-file:
- Microsoft.Insights/preview/2020-06-02-preview/livetoken_API.json
```

### Tag: package-preview-2020-02

These settings apply only when `--tag=package-preview-2020-02` is specified on the command line.

``` yaml $(tag) == 'package-preview-2020-02'
input-file:
- Microsoft.Insights/preview/2020-02-10-preview/WebTestResults_API.json
```

### Tag: package-2015-05
### Tag: package-2020-04

These settings apply only when `--tag=package-2015-05` is specified on the command line.
These settings apply only when `--tag=package-2020-04` is specified on the command line. For Dotnet SDK generation.

``` yaml $(tag) == 'package-2015-05'
``` yaml $(tag) == 'package-2020-04'
input-file:
- Microsoft.Insights/stable/2015-05-01/aiOperations_API.json
- Microsoft.Insights/stable/2015-05-01/componentAnnotations_API.json
- Microsoft.Insights/stable/2015-05-01/componentApiKeys_API.json
- Microsoft.Insights/stable/2015-05-01/componentContinuousExport_API.json
- Microsoft.Insights/stable/2015-05-01/componentFeaturesAndPricing_API.json
- Microsoft.Insights/stable/2015-05-01/componentProactiveDetection_API.json
- Microsoft.Insights/stable/2015-05-01/components_API.json
- Microsoft.Insights/stable/2015-05-01/componentWorkItemConfigs_API.json
- Microsoft.Insights/stable/2015-05-01/favorites_API.json
- Microsoft.Insights/stable/2015-05-01/webTestLocations_API.json
- Microsoft.Insights/stable/2015-05-01/webTests_API.json
- Microsoft.Insights/stable/2015-05-01/analyticsItems_API.json
- Microsoft.Insights/stable/2015-05-01/workbooks_API.json
- Microsoft.Insights/stable/2015-05-01/myworkbooks_API.json
- Microsoft.Insights/preview/2018-05-01-preview/components_API.json
- Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json
```

### Tag: package-2017-10
### Tag: package-2020-03-01-preview

These settings apply only when `--tag=package-2017-10` is specified on the command line.
These settings apply only when `--tag=package-2020-03-01-preview` is specified on the command line.

``` yaml $(tag) == 'package-2017-10'
``` yaml $(tag) == 'package-2020-03-01-preview'
input-file:
- Microsoft.Insights/preview/2017-10-01/eaSubscriptionMigration_API.json
- Microsoft.Insights/preview/2017-10-01/componentFeaturesAndPricing_API.json
- Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json
```

### Tag: package-2018-06-17-preview
### Tag: package-preview-2020-02

These settings apply only when `--tag=package-2018-06-17-preview` is specified on the command line.
These settings apply only when `--tag=package-preview-2020-02` is specified on the command line.

``` yaml $(tag) == 'package-2018-06-17-preview'
``` yaml $(tag) == 'package-preview-2020-02'
input-file:
- Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json
- Microsoft.Insights/preview/2020-02-10-preview/WebTestResults_API.json
```

### Tag: package-2020-02-02-preview

These settings apply only when `--tag=package-2020-02-02-preview` is specified on the command line.

``` yaml $(tag) == 'package-2020-02-02-preview'
input-file:
- Microsoft.Insights/preview/2020-02-02-preview/components_API.json
```

### Tag: package-2019-10-17-preview
Expand All @@ -361,55 +337,55 @@ input-file:
- Microsoft.Insights/preview/2019-10-17-preview/workbookTemplates_API.json
```

### Tag: package-2018-05-01-preview
### Tag: package-2018-06-17-preview

These settings apply only when `--tag=package-2018-05-01-preview` is specified on the command line.
These settings apply only when `--tag=package-2018-06-17-preview` is specified on the command line.

``` yaml $(tag) == 'package-2018-05-01-preview'
``` yaml $(tag) == 'package-2018-06-17-preview'
input-file:
- Microsoft.Insights/preview/2018-05-01-preview/componentProactiveDetection_API.json
- Microsoft.Insights/preview/2018-05-01-preview/components_API.json
- Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json
```

### Tag: package-2020-02-02-preview
### Tag: package-2018-05-01-preview

These settings apply only when `--tag=package-2020-02-02-preview` is specified on the command line.
These settings apply only when `--tag=package-2018-05-01-preview` is specified on the command line.

``` yaml $(tag) == 'package-2020-02-02-preview'
``` yaml $(tag) == 'package-2018-05-01-preview'
input-file:
- Microsoft.Insights/preview/2020-02-02-preview/components_API.json
- Microsoft.Insights/preview/2018-05-01-preview/componentProactiveDetection_API.json
- Microsoft.Insights/preview/2018-05-01-preview/components_API.json
```

### Tag: package-2020-03-01-preview
### Tag: package-2017-10

These settings apply only when `--tag=package-2020-03-01-preview` is specified on the command line.
These settings apply only when `--tag=package-2017-10` is specified on the command line.

``` yaml $(tag) == 'package-2020-03-01-preview'
``` yaml $(tag) == 'package-2017-10'
input-file:
- Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json
- Microsoft.Insights/preview/2017-10-01/eaSubscriptionMigration_API.json
- Microsoft.Insights/preview/2017-10-01/componentFeaturesAndPricing_API.json
```

### Tag: package-2020-04
### Tag: package-2015-05

These settings apply only when `--tag=package-2020-04` is specified on the command line. For Dotnet SDK generation.
These settings apply only when `--tag=package-2015-05` is specified on the command line.

``` yaml $(tag) == 'package-2020-04'
``` yaml $(tag) == 'package-2015-05'
input-file:
- Microsoft.Insights/stable/2015-05-01/aiOperations_API.json
- Microsoft.Insights/stable/2015-05-01/componentAnnotations_API.json
- Microsoft.Insights/stable/2015-05-01/componentApiKeys_API.json
- Microsoft.Insights/stable/2015-05-01/componentContinuousExport_API.json
- Microsoft.Insights/stable/2015-05-01/componentFeaturesAndPricing_API.json
- Microsoft.Insights/stable/2015-05-01/componentProactiveDetection_API.json
- Microsoft.Insights/stable/2015-05-01/components_API.json
- Microsoft.Insights/stable/2015-05-01/componentWorkItemConfigs_API.json
- Microsoft.Insights/stable/2015-05-01/favorites_API.json
- Microsoft.Insights/stable/2015-05-01/webTestLocations_API.json
- Microsoft.Insights/stable/2015-05-01/webTests_API.json
- Microsoft.Insights/stable/2015-05-01/analyticsItems_API.json
- Microsoft.Insights/stable/2015-05-01/workbooks_API.json
- Microsoft.Insights/stable/2015-05-01/myworkbooks_API.json
- Microsoft.Insights/preview/2018-05-01-preview/components_API.json
- Microsoft.Insights/preview/2020-03-01-preview/componentLinkedStorageAccounts_API.json
```

---
Expand Down