Skip to content

Commit 6f183ef

Browse files
authored
Merge pull request #1613 from Azure/autogenerate
Merge autogenerate -> master
2 parents 4cff05b + 04ec906 commit 6f183ef

File tree

67 files changed

+38958
-874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+38958
-874
lines changed

generator/autogenlist.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { ScopeType, AutogenlistConfig } from './models';
2+
import { postProcessor as insightsApplicationPostProcessor } from './processors/Microsoft.Insights.Application';
23
import { postProcessor as resourcesPostProcessor } from './processors/Microsoft.Resources';
34
import { postProcessor as machineLearningPostProcessor } from './processors/Microsoft.MachineLearning';
5+
import { postProcessor as machineLearningServicesPostProcessor } from './processors/Microsoft.MachineLearningServices';
46
import { postProcessor as storageProcessor } from './processors/Microsoft.Storage';
57
import { lowerCaseEquals } from './utils';
68

@@ -332,6 +334,11 @@ const autogenlist: AutogenlistConfig[] = [
332334
namespace: 'Microsoft.MachineLearning',
333335
postProcessor: machineLearningPostProcessor,
334336
},
337+
{
338+
basePath: 'machinelearningservices/resource-manager',
339+
namespace: 'Microsoft.MachineLearningServices',
340+
postProcessor: machineLearningServicesPostProcessor,
341+
},
335342
{
336343
basePath: 'machinelearningcompute/resource-manager',
337344
namespace: 'Microsoft.MachineLearningCompute',
@@ -378,10 +385,6 @@ const autogenlist: AutogenlistConfig[] = [
378385
basePath: 'marketplace/resource-manager',
379386
namespace: 'Microsoft.Marketplace',
380387
},
381-
{
382-
basePath: 'machinelearningservices/resource-manager',
383-
namespace: 'Microsoft.MachineLearningServices',
384-
},
385388
{
386389
basePath: 'mysql/resource-manager',
387390
namespace: 'Microsoft.DBforMySQL',
@@ -706,6 +709,7 @@ const autogenlist: AutogenlistConfig[] = [
706709
basePath: 'applicationinsights/resource-manager',
707710
namespace: 'Microsoft.Insights',
708711
suffix: 'Application',
712+
postProcessor: insightsApplicationPostProcessor,
709713
},
710714
{
711715
basePath: 'quantum/resource-manager',

generator/package-lock.json

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { SchemaPostProcessor } from '../models';
2+
3+
export const postProcessor: SchemaPostProcessor = (namespace: string, apiVersion: string, schema: any) => {
4+
// this shouldn't be a resource definition, and it causes Export failures as it contains duplicate properties "Type" and "type"
5+
if (schema.resourceDefinitions['components_Annotations']) {
6+
delete schema.resourceDefinitions['components_Annotations'];
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { SchemaPostProcessor } from '../models';
2+
3+
export const postProcessor: SchemaPostProcessor = (namespace: string, apiVersion: string, schema: any) => {
4+
const cyclicRef = schema.definitions?.LabelClass?.properties?.subclasses?.oneOf[0]?.additionalProperties;
5+
if (cyclicRef && cyclicRef['$ref']) {
6+
delete cyclicRef['$ref'];
7+
cyclicRef['type'] = 'object';
8+
}
9+
}

0 commit comments

Comments
 (0)