Skip to content

Commit c1658dc

Browse files
Fix up tests
1 parent 042469f commit c1658dc

18 files changed

+65
-35
lines changed

generator/autogenlist.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { postProcessor as storageProcessor } from './processors/Microsoft.Storag
77
import { postProcessor as computeProcessor } from './processors/Microsoft.Compute';
88
import { postProcessor as policyProcessor } from './processors/Microsoft.Authorization';
99
import { postProcessor as securityInsightsPostProcessor } from './processors/Microsoft.SecurityInsights';
10+
import { postProcessor as costManagementPostProcessor } from './processors/Microsoft.CostManagement';
11+
import { postProcessor as providerHubPostProcessor } from './processors/Microsoft.ProviderHub';
1012
import { lowerCaseEquals } from './utils';
1113

1214
// New providers are onboarded by default. The providers listed here are the only ones **not** onboarded.
@@ -270,6 +272,7 @@ const autoGenList: AutoGenConfig[] = [
270272
scopes: ScopeType.Tenant | ScopeType.ManagementGroup | ScopeType.Subcription | ScopeType.ResourceGroup | ScopeType.Extension,
271273
},
272274
],
275+
postProcessor: costManagementPostProcessor,
273276
},
274277
{
275278
basePath: 'customerlockbox/resource-manager',
@@ -573,6 +576,11 @@ const autoGenList: AutoGenConfig[] = [
573576
basePath: 'powerbiembedded/resource-manager',
574577
namespace: 'Microsoft.PowerBI',
575578
},
579+
{
580+
basePath: 'providerhub/resource-manager',
581+
namespace: 'Microsoft.ProviderHub',
582+
postProcessor: providerHubPostProcessor
583+
},
576584
{
577585
basePath: 'quota/resource-manager',
578586
namespace: 'Microsoft.Quota',
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { SchemaPostProcessor } from '../models';
2+
import { replaceCyclicRef } from './helpers';
3+
4+
export const postProcessor: SchemaPostProcessor = async (namespace: string, apiVersion: string, schema: any) => {
5+
replaceCyclicRef(schema.definitions?.ReportConfigFilter?.properties?.and?.oneOf[0]?.items);
6+
replaceCyclicRef(schema.definitions?.ReportConfigFilter?.properties?.not?.oneOf[0]);
7+
replaceCyclicRef(schema.definitions?.ReportConfigFilter?.properties?.or?.oneOf[0]?.items);
8+
replaceCyclicRef(schema.definitions?.ReportFilter?.properties?.and?.oneOf[0]?.items);
9+
replaceCyclicRef(schema.definitions?.ReportFilter?.properties?.not?.oneOf[0]);
10+
replaceCyclicRef(schema.definitions?.ReportFilter?.properties?.or?.oneOf[0]?.items);
11+
replaceCyclicRef(schema.definitions?.QueryFilter?.properties?.and?.oneOf[0]?.items);
12+
replaceCyclicRef(schema.definitions?.QueryFilter?.properties?.not?.oneOf[0]);
13+
replaceCyclicRef(schema.definitions?.QueryFilter?.properties?.or?.oneOf[0]?.items);
14+
replaceCyclicRef(schema.definitions?.QueryFilterModel?.properties?.and?.oneOf[0]?.items);
15+
replaceCyclicRef(schema.definitions?.QueryFilterModel?.properties?.not?.oneOf[0]);
16+
replaceCyclicRef(schema.definitions?.QueryFilterModel?.properties?.or?.oneOf[0]?.items);
17+
replaceCyclicRef(schema.definitions?.Scope?.properties?.childScope?.oneOf[0]);
18+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { SchemaPostProcessor } from '../models';
2+
import { replaceCyclicRef } from './helpers';
3+
4+
export const postProcessor: SchemaPostProcessor = async (namespace: string, apiVersion: string, schema: any) => {
5+
replaceCyclicRef(schema.definitions?.ExtendedErrorInfo?.properties?.details?.oneOf[0]?.items);
6+
}

schemas/2018-05-31/Microsoft.CostManagement.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
{
362362
"type": "array",
363363
"items": {
364-
"$ref": "#/definitions/ReportConfigFilter"
364+
"type": "object"
365365
}
366366
},
367367
{
@@ -384,7 +384,7 @@
384384
"not": {
385385
"oneOf": [
386386
{
387-
"$ref": "#/definitions/ReportConfigFilter"
387+
"type": "object"
388388
},
389389
{
390390
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
@@ -397,7 +397,7 @@
397397
{
398398
"type": "array",
399399
"items": {
400-
"$ref": "#/definitions/ReportConfigFilter"
400+
"type": "object"
401401
}
402402
},
403403
{

schemas/2018-08-01-preview/Microsoft.CostManagement.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@
502502
{
503503
"type": "array",
504504
"items": {
505-
"$ref": "#/definitions/ReportFilter"
505+
"type": "object"
506506
}
507507
},
508508
{
@@ -525,7 +525,7 @@
525525
"not": {
526526
"oneOf": [
527527
{
528-
"$ref": "#/definitions/ReportFilter"
528+
"type": "object"
529529
},
530530
{
531531
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
@@ -538,7 +538,7 @@
538538
{
539539
"type": "array",
540540
"items": {
541-
"$ref": "#/definitions/ReportFilter"
541+
"type": "object"
542542
}
543543
},
544544
{

schemas/2019-01-01/Microsoft.CostManagement.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@
469469
{
470470
"type": "array",
471471
"items": {
472-
"$ref": "#/definitions/QueryFilter"
472+
"type": "object"
473473
}
474474
},
475475
{
@@ -492,7 +492,7 @@
492492
"not": {
493493
"oneOf": [
494494
{
495-
"$ref": "#/definitions/QueryFilter"
495+
"type": "object"
496496
},
497497
{
498498
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
@@ -505,7 +505,7 @@
505505
{
506506
"type": "array",
507507
"items": {
508-
"$ref": "#/definitions/QueryFilter"
508+
"type": "object"
509509
}
510510
},
511511
{

schemas/2019-03-01-preview/Microsoft.CostManagement.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@
300300
"childScope": {
301301
"oneOf": [
302302
{
303-
"$ref": "#/definitions/Scope"
303+
"type": "object"
304304
},
305305
{
306306
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"

schemas/2019-04-01-preview/Microsoft.CostManagement.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@
650650
{
651651
"type": "array",
652652
"items": {
653-
"$ref": "#/definitions/ReportConfigFilter"
653+
"type": "object"
654654
}
655655
},
656656
{
@@ -673,7 +673,7 @@
673673
"not": {
674674
"oneOf": [
675675
{
676-
"$ref": "#/definitions/ReportConfigFilter"
676+
"type": "object"
677677
},
678678
{
679679
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
@@ -686,7 +686,7 @@
686686
{
687687
"type": "array",
688688
"items": {
689-
"$ref": "#/definitions/ReportConfigFilter"
689+
"type": "object"
690690
}
691691
},
692692
{

schemas/2019-04-01/deploymentTemplate.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,6 @@
638638
{ "$ref": "https://schema.management.azure.com/schemas/2018-07-01/Microsoft.Media.json#/resourceDefinitions/mediaServices_streamingPolicies" },
639639
{ "$ref": "https://schema.management.azure.com/schemas/2018-07-01/Microsoft.Media.json#/resourceDefinitions/mediaServices_transforms" },
640640
{ "$ref": "https://schema.management.azure.com/schemas/2018-07-01/Microsoft.Media.json#/resourceDefinitions/mediaServices_transforms_jobs" },
641-
{ "$ref": "https://schema.management.azure.com/schemas/2016-09-01-preview/Microsoft.Solutions.json#/resourceDefinitions/applianceDefinitions" },
642-
{ "$ref": "https://schema.management.azure.com/schemas/2016-09-01-preview/Microsoft.Solutions.json#/resourceDefinitions/appliances" },
643641
{ "$ref": "https://schema.management.azure.com/schemas/2016-06-01/Microsoft.Network.json#/resourceDefinitions/publicIPAddresses" },
644642
{ "$ref": "https://schema.management.azure.com/schemas/2016-06-01/Microsoft.Network.json#/resourceDefinitions/virtualNetworks" },
645643
{ "$ref": "https://schema.management.azure.com/schemas/2016-06-01/Microsoft.Network.json#/resourceDefinitions/loadBalancers" },

schemas/2019-09-01/Microsoft.CostManagement.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
{
468468
"type": "array",
469469
"items": {
470-
"$ref": "#/definitions/QueryFilter"
470+
"type": "object"
471471
}
472472
},
473473
{
@@ -490,7 +490,7 @@
490490
"not": {
491491
"oneOf": [
492492
{
493-
"$ref": "#/definitions/QueryFilter"
493+
"type": "object"
494494
},
495495
{
496496
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
@@ -503,7 +503,7 @@
503503
{
504504
"type": "array",
505505
"items": {
506-
"$ref": "#/definitions/QueryFilter"
506+
"type": "object"
507507
}
508508
},
509509
{

0 commit comments

Comments
 (0)