Skip to content

Commit c9d954d

Browse files
Merge pull request #3063 from Azure/ant/auto
Onboard more RPs to autogeneration
2 parents d5adb33 + c87342f commit c9d954d

File tree

20 files changed

+5211
-298
lines changed

20 files changed

+5211
-298
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ If you want to preview or troubleshoot generation locally, you can use the gener
2424
npm --prefix bicep-types-az/bicep-types/src/bicep-types run build
2525
npm --prefix bicep-types-az/src/autorest.bicep ci
2626
npm --prefix bicep-types-az/src/autorest.bicep run build
27-
1. Run the following commands (replace the base path accordingly - valid paths can be disovered with `npm run list-basepaths -- --specs-dir path/to/azure-rest-api-specs`):
27+
1. Run the following commands, replacing `../azure-rest-api-specs` with your relative path to the swagger repo, and `myprovider/resource-manager` with the base path (discovered with `npm --prefix generator run list-basepaths`)
2828
```bash
29-
cd generator
3029
npm --prefix generator ci
31-
npm --prefix generator run generate-single -- --specs-dir path/to/azure-rest-api-specs --base-path myprovider/resource-manager
30+
npm --prefix generator run generate-single -- --specs-dir ../azure-rest-api-specs --base-path myprovider/resource-manager
3231
```
3332

3433
### Runing Unit Tests

generator/autogenlist.ts

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,11 @@ import { detectProviderNamespaces } from './generate';
2222
// New providers are onboarded by default. The providers listed here are the only ones **not** onboarded.
2323
const disabledProviders: AutoGenConfig[] = [
2424
{
25-
basePath: 'cloudshell/resource-manager',
26-
namespace: 'Microsoft.Portal',
27-
disabledForAutogen: true,
28-
},
29-
{
30-
basePath: 'compute/resource-manager',
31-
namespace: 'Microsoft.ContainerService',
32-
disabledForAutogen: true,
33-
},
34-
{
35-
basePath: 'cdn/resource-manager',
36-
namespace: 'Microsoft.Cdn',
37-
},
38-
{
25+
// Need to be very careful - Microsoft.Logic are heavily dependent on Export Template, and are sensitive to properties being removed unintentionally
3926
basePath: 'logic/resource-manager',
4027
namespace: 'Microsoft.Logic',
4128
disabledForAutogen: true,
4229
},
43-
{
44-
basePath: 'managedservices/resource-manager',
45-
namespace: 'Microsoft.ManagedServices',
46-
disabledForAutogen: true,
47-
},
48-
{
49-
basePath: 'operationsmanagement/resource-manager',
50-
namespace: 'Microsoft.OperationsManagement',
51-
disabledForAutogen: true,
52-
},
53-
{
54-
basePath: 'service-map/resource-manager',
55-
namespace: 'Microsoft.OperationalInsights',
56-
disabledForAutogen: true,
57-
},
58-
{
59-
basePath: 'videoanalyzer/resource-manager',
60-
namespace: 'Microsoft.Media',
61-
disabledForAutogen: true,
62-
},
6330
];
6431

6532
// Run "npm run list-basepaths" to discover all the valid readme files to add to this list
@@ -1150,6 +1117,20 @@ const autoGenList: AutoGenConfig[] = [
11501117
basePath: 'confidentialLedger/resource-manager',
11511118
namespace: 'Microsoft.ConfidentialLedger',
11521119
},
1120+
{
1121+
basePath: 'managedservices/resource-manager',
1122+
namespace: 'Microsoft.ManagedServices',
1123+
resourceConfig: [
1124+
{
1125+
type: 'registrationDefinitions',
1126+
scopes: ScopeType.Subscription,
1127+
},
1128+
{
1129+
type: 'registrationAssignments',
1130+
scopes: ScopeType.Subscription | ScopeType.ResourceGroup,
1131+
},
1132+
]
1133+
},
11531134
];
11541135

11551136
export function findAutogenEntries(basePath: string): AutoGenConfig[] {

schemas/2014-04-01-preview/deploymentTemplate.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5580,16 +5580,16 @@
55805580
"$ref": "https://schema.management.azure.com/schemas/2019-10-01-preview/Microsoft.Migrate.ResourceMover.json#/resourceDefinitions/moveCollections_moveResources"
55815581
},
55825582
{
5583-
"$ref": "https://schema.management.azure.com/schemas/2018-06-01-preview/Microsoft.ManagedServices.json#/resourceDefinitions/registrationAssignments"
5583+
"$ref": "https://schema.management.azure.com/schemas/2018-06-01-preview/Microsoft.ManagedServices.json#/unknown_resourceDefinitions/registrationAssignments"
55845584
},
55855585
{
5586-
"$ref": "https://schema.management.azure.com/schemas/2018-06-01-preview/Microsoft.ManagedServices.json#/resourceDefinitions/registrationDefinitions"
5586+
"$ref": "https://schema.management.azure.com/schemas/2018-06-01-preview/Microsoft.ManagedServices.json#/unknown_resourceDefinitions/registrationDefinitions"
55875587
},
55885588
{
5589-
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ManagedServices.json#/resourceDefinitions/registrationAssignments"
5589+
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ManagedServices.json#/unknown_resourceDefinitions/registrationAssignments"
55905590
},
55915591
{
5592-
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ManagedServices.json#/resourceDefinitions/registrationDefinitions"
5592+
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ManagedServices.json#/unknown_resourceDefinitions/registrationDefinitions"
55935593
},
55945594
{
55955595
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ContainerService.Aks.json#/resourceDefinitions/managedClusters"

schemas/2015-01-01/deploymentTemplate.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3031,16 +3031,16 @@
30313031
"$ref": "https://schema.management.azure.com/schemas/2019-10-01/Microsoft.Migrate.Migrate.json#/resourceDefinitions/assessmentProjects_vmwarecollectors"
30323032
},
30333033
{
3034-
"$ref": "https://schema.management.azure.com/schemas/2018-06-01-preview/Microsoft.ManagedServices.json#/resourceDefinitions/registrationAssignments"
3034+
"$ref": "https://schema.management.azure.com/schemas/2018-06-01-preview/Microsoft.ManagedServices.json#/unknown_resourceDefinitions/registrationAssignments"
30353035
},
30363036
{
3037-
"$ref": "https://schema.management.azure.com/schemas/2018-06-01-preview/Microsoft.ManagedServices.json#/resourceDefinitions/registrationDefinitions"
3037+
"$ref": "https://schema.management.azure.com/schemas/2018-06-01-preview/Microsoft.ManagedServices.json#/unknown_resourceDefinitions/registrationDefinitions"
30383038
},
30393039
{
3040-
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ManagedServices.json#/resourceDefinitions/registrationAssignments"
3040+
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ManagedServices.json#/unknown_resourceDefinitions/registrationAssignments"
30413041
},
30423042
{
3043-
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ManagedServices.json#/resourceDefinitions/registrationDefinitions"
3043+
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ManagedServices.json#/unknown_resourceDefinitions/registrationDefinitions"
30443044
},
30453045
{
30463046
"$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.ContainerService.Aks.json#/resourceDefinitions/managedClusters"

0 commit comments

Comments
 (0)