Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
a6ecff5
Merge remote-tracking branch 'origin/master' into autogenerate
Jul 27, 2021
c69ffee
Autogenerate schemas
Jul 27, 2021
57aa1db
Update resource list
Jul 27, 2021
ab13cb6
Autogenerate schemas
Jul 27, 2021
1c73f99
Update resource list
Jul 27, 2021
7f10558
Autogenerate schemas
Jul 28, 2021
9d64650
Autogenerate schemas
Jul 28, 2021
26ced22
Update resource list
Jul 28, 2021
d2d0f8f
Autogenerate schemas
Jul 28, 2021
d60b3f6
Autogenerate schemas
Jul 28, 2021
d3911f1
Merge remote-tracking branch 'origin/master' into autogenerate
Jul 29, 2021
150f6c2
Autogenerate schemas
Jul 29, 2021
1b3a4b4
Autogenerate schemas
Jul 29, 2021
e5acba0
Autogenerate schemas
Jul 29, 2021
6f45f02
Autogenerate schemas
Jul 30, 2021
dd9be1b
Merge remote-tracking branch 'origin/master' into autogenerate
Jul 30, 2021
5c3f55b
Autogenerate schemas
Jul 30, 2021
33abda1
Autogenerate schemas
Jul 30, 2021
d20b36f
Autogenerate schemas
Jul 30, 2021
576f704
Autogenerate schemas
Jul 31, 2021
d78caca
Autogenerate schemas
Jul 31, 2021
88dc4a9
Autogenerate schemas
Jul 31, 2021
c84ec7c
Autogenerate schemas
Aug 1, 2021
8649ea2
Autogenerate schemas
Aug 1, 2021
e7f2c7c
Merge remote-tracking branch 'origin/master' into autogenerate
Aug 2, 2021
3d86d6e
Autogenerate schemas
Aug 2, 2021
68a3c9e
Autogenerate schemas
Aug 2, 2021
26822dd
Autogenerate schemas
Aug 3, 2021
2794309
Autogenerate schemas
Aug 3, 2021
4fa739f
Autogenerate schemas
Aug 3, 2021
9faa05f
Autogenerate schemas
Aug 3, 2021
1897f88
Merge remote-tracking branch 'origin/master' into autogenerate
Aug 4, 2021
ebfca2d
Autogenerate schemas
Aug 4, 2021
d1e8666
Autogenerate schemas
Aug 4, 2021
b649c66
Update resource list
Aug 4, 2021
2d17063
Autogenerate schemas
Aug 4, 2021
a5a4f7f
Rename master -> main
anthony-c-martin Aug 4, 2021
ffca211
Onboard RPs for autogen by default
anthony-c-martin Aug 4, 2021
88d3c9f
Bump dependencies
anthony-c-martin Aug 4, 2021
bf7ba1e
Remove unused file
anthony-c-martin Aug 4, 2021
d1f8696
Update generator readme
anthony-c-martin Aug 4, 2021
bd3d765
Merge pull request #1821 from Azure/main
anthony-c-martin Aug 5, 2021
adb409c
Autogenerate schemas
Aug 6, 2021
04fecc6
Update resource list
Aug 6, 2021
c1760e7
Remove cloudServices/updateDomains resource from ARM Schema
Aug 6, 2021
d12aaec
Autogenerate schemas
Aug 6, 2021
2b9b09f
Update resource list
Aug 6, 2021
87fa4d8
Generated report
Aug 6, 2021
7962866
removed deprecated api-version
jorgecotillo Aug 6, 2021
bb7ddea
Merge pull request #1825 from sanchitkum/compute/cs-no-ud
anthony-c-martin Aug 6, 2021
b7ef9f6
Merge pull request #1826 from Azure/autogenerate
anthony-c-martin Aug 6, 2021
a360679
CodeGen from PR 14589 in Azure/azure-rest-api-specs
Aug 9, 2021
4f8649c
[ReleasePR datafactory] Support UAMI in ADF IR/LS/Activity (#1827)
Aug 9, 2021
b26e0a4
CodeGen from PR 15499 in Azure/azure-rest-api-specs
Aug 9, 2021
f9ced97
[ReleasePR sql] add_support_for_action_groups (#1828)
Aug 9, 2021
f38e772
Comments & rename to clarify blocklist behavior
anthony-c-martin Aug 9, 2021
169539a
Merge pull request #1820 from Azure/antmarti/onboard_by_default
anthony-c-martin Aug 9, 2021
893a1d0
Update generateall.ts
anthony-c-martin Aug 11, 2021
fd45b5c
Merge pull request #1830 from Azure/fix_autogen_pipeline
anthony-c-martin Aug 11, 2021
0143ae3
Fix generator pipeline
anthony-c-martin Aug 11, 2021
94c6d5e
Merge pull request #1831 from Azure/antmarti/fix_generator_pipeline
anthony-c-martin Aug 11, 2021
2fb872b
CodeGen from PR 15421 in Azure/azure-rest-api-specs
Aug 12, 2021
ee1e05c
[ReleasePR billing] Fixing s360 swagger correctness (#1832)
Aug 12, 2021
2b0dff8
CodeGen from PR 15598 in Azure/azure-rest-api-specs
Aug 12, 2021
2e87795
[ReleasePR logz] moving logz to stable (#1833)
Aug 12, 2021
1cc4ace
CodeGen from PR 15628 in Azure/azure-rest-api-specs
Aug 12, 2021
02879d7
[ReleasePR web] track1 add batch tag for web (#1834)
Aug 12, 2021
47a1f32
CodeGen from PR 15520 in Azure/azure-rest-api-specs
Aug 12, 2021
3081eba
[ReleasePR reservations] Swagger correctness fixes (#1835)
Aug 12, 2021
a46818f
CodeGen from PR 15526 in Azure/azure-rest-api-specs
Aug 12, 2021
8752db6
[ReleasePR databoxedge] Updated description for K8 and CloudEdgeManag…
Aug 12, 2021
37ca360
CodeGen from PR 15259 in Azure/azure-rest-api-specs
Aug 13, 2021
f97cad0
[ReleasePR datamigration] Dev datamigration microsoft.data migration …
Aug 13, 2021
debd04d
CodeGen from PR 15584 in Azure/azure-rest-api-specs
Aug 13, 2021
5150e49
[ReleasePR datafactory] [Datafactory] Swagger change for Power Query …
Aug 13, 2021
a47087c
CodeGen from PR 15498 in Azure/azure-rest-api-specs
Aug 18, 2021
ee051bb
[ReleasePR databricks] Added OutboundNetworkDependenciesEndpoints API…
Aug 18, 2021
3ac7617
CodeGen from PR 15377 in Azure/azure-rest-api-specs
Aug 18, 2021
579900b
[ReleasePR apimanagement] Spec fixed to reflect new examples property…
Aug 18, 2021
c9ad020
CodeGen from PR 15011 in Azure/azure-rest-api-specs
Aug 18, 2021
412d704
[ReleasePR netapp] [NetAppFiles] Anf 13322 net app files api version …
Aug 18, 2021
c94098c
Onboard Microsoft.Purview for auto generation
anthony-c-martin Aug 18, 2021
1ba4551
CodeGen from PR 15577 in Azure/azure-rest-api-specs
Aug 19, 2021
c782fbf
[ReleasePR recoveryservicesbackup] Swagger changes for MFA work (#1846)
Aug 19, 2021
d95c0f7
CodeGen from PR 15691 in Azure/azure-rest-api-specs
Aug 19, 2021
dddcb4b
[ReleasePR netapp] [NetAppFiles] fix default in volumeproperties (#1848)
Aug 19, 2021
0bbabf7
CodeGen from PR 15390 in Azure/azure-rest-api-specs
Aug 19, 2021
08e0dc5
[ReleasePR security] Add2021-06-01AsessmentsAPIVersion (#1849)
Aug 19, 2021
4079b3c
Merge pull request #1845 from Azure/anthony-c-martin-patch-1
anthony-c-martin Aug 19, 2021
911092f
CodeGen from PR 15700 in Azure/azure-rest-api-specs
Aug 20, 2021
36bbe13
[ReleasePR purview] Purview add "x-ms-secret" attribute to ListKeys r…
Aug 20, 2021
23b9ac8
CodeGen from PR 15708 in Azure/azure-rest-api-specs
Aug 24, 2021
8a45c17
[ReleasePR recoveryservices] Adding 2021-07-01 version in recoveryser…
Aug 24, 2021
c969c0d
CodeGen from PR 15708 in Azure/azure-rest-api-specs
Aug 24, 2021
919c8e7
[ReleasePR recoveryservicessiterecovery] Adding 2021-07-01 version in…
Aug 24, 2021
646feef
CodeGen from PR 15500 in Azure/azure-rest-api-specs
Aug 24, 2021
1772169
[ReleasePR marketplace] added notifications settings (#1857)
Aug 24, 2021
3d5fa6f
CodeGen from PR 15428 in Azure/azure-rest-api-specs
Aug 24, 2021
8840c59
[ReleasePR iothub] [Hub Generated] Review request for Microsoft.Devic…
Aug 24, 2021
38cd728
add compute 2021-07-01 and 2021-04-01
grizzlytheodore Aug 25, 2021
51286cf
CodeGen from PR 15722 in Azure/azure-rest-api-specs
Aug 25, 2021
6fd36e3
[ReleasePR iothub] Removing readonly for isVerified property as it is…
Aug 25, 2021
b933c84
CodeGen from PR 15763 in Azure/azure-rest-api-specs
Aug 25, 2021
1a448d6
[ReleasePR mixedreality] [Hub Generated] Public private branch 'raono…
Aug 25, 2021
daded12
CodeGen from PR 15636 in Azure/azure-rest-api-specs
Aug 25, 2021
ce2f9eb
[ReleasePR applicationinsights] [Hub Generated] Review request for Mi…
Aug 25, 2021
fd5950d
deploymentTemplate
grizzlytheodore Aug 25, 2021
29ba1b5
Merge pull request #1859 from grizzlytheodore/master
anthony-c-martin Aug 26, 2021
5faeac0
CodeGen from PR 15797 in Azure/azure-rest-api-specs
Aug 26, 2021
cbe6d70
[ReleasePR iothub] Revert "[Hub Generated] Review request for Microso…
Aug 26, 2021
bf9360a
CodeGen from PR 15458 in Azure/azure-rest-api-specs
Aug 26, 2021
56a77d1
[ReleasePR keyvault] Add rotation permission (#1865)
Aug 26, 2021
594c023
CodeGen from PR 15626 in Azure/azure-rest-api-specs
Aug 26, 2021
0da305f
[ReleasePR datafactory] [DataFactory]Support AmazonRdsForOracle Conne…
Aug 26, 2021
8b16bcb
CodeGen from PR 14956 in Azure/azure-rest-api-specs
Aug 26, 2021
d6a9b1f
[ReleasePR automation] Add New Api 2021-06-22 (#1867)
Aug 26, 2021
a051421
CodeGen from PR 15213 in Azure/azure-rest-api-specs
Aug 26, 2021
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
68 changes: 0 additions & 68 deletions .github/workflows/autogenerateBatch0.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
pull_request:
branches: [ master ]
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines-autogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ jobs:
set -Eeuxo pipefail
git checkout $(Build.SourceBranchName)
git pull
git merge --no-commit --no-ff --strategy-option=theirs origin/master
git merge --no-commit --no-ff --strategy-option=theirs origin/main
if ! git diff-index --quiet HEAD --; then
git commit -m "Merge remote-tracking branch 'origin/master' into $(Build.SourceBranchName)"
git commit -m "Merge remote-tracking branch 'origin/main' into $(Build.SourceBranchName)"
git push origin $(Build.SourceBranchName)
fi
displayName: Integrate master branch
displayName: Integrate main branch

- script: |
set -Eeuxo pipefail
Expand Down
22 changes: 13 additions & 9 deletions generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ View the Pipeline Configuration [here](/azure-pipelines-autogen.yml).
#### Merging Pipeline-generated schemas

1. Review the status badge on this page to ensure the latest run was successful.
2. Create a Pull Request from [`autogenerate`](https://github.com/Azure/azure-resource-manager-schemas/tree/autogenerate) to [`master`](https://github.com/Azure/azure-resource-manager-schemas/tree/master).
2. Create a Pull Request from [`autogenerate`](https://github.com/Azure/azure-resource-manager-schemas/tree/autogenerate) to [`main`](https://github.com/Azure/azure-resource-manager-schemas/tree/main).
3. If there are any modifications to [schemas/common/autogeneratedResources.json](/schemas/common/autogeneratedResources.json), push a commit to the autogenerate branch to make any corresponding changes to [schemas/2014-04-01-preview/deploymentTemplate.json](/schemas/2014-04-01-preview/deploymentTemplate.json) and [schemas/2015-01-01/deploymentTemplate.json](/schemas/2015-01-01/deploymentTemplate.json).

#### Onboarding to the autogeneration pipeline

1. Follow the steps listed under [Getting Started](#getting-started). The following commands assume you are running in the `generator` directory.
3. Run `npm run list-basepaths` to discover the specs repo path containing the swagger definitions.
4. Run `npm run generate-single {basePath}` to generate schemas for them. Save the console output to file.
5. Manually remove any existing references to your provider namespace (if any) from [schemas/2019-04-01/deploymentTemplate.json](/schemas/2019-04-01/deploymentTemplate.json).
6. Add the {basePath} to the autogenlist array in [autogenlist.ts](./autogenlist.ts).
7. Commit all the changed files, and submit a PR to this repo with title "Onboarding {provider} for autogeneration". Include the full output saved in step 2 as a comment.
8. Ensure all CI tests pass, and ask the team to review the PR (including tool output) to ensure that all expected resources have been detected and generated as expected.
New resource providers are onboarded for autogeneration by default, so the only providers which have been opted out are listed in [autogenlist.ts](./autogenlist.ts) with `disabledForAutogen` set.

If your team has been opted out, and you would like to opt in, please raise an issue in this repo, and we will assist.

> The following steps are no longer necessary for onboarding, but listed here for reference:
> 1. Follow the steps listed under [Getting Started](#getting-started). The following commands assume you are running in the > `generator` directory.
> 3. Run `npm run list-basepaths` to discover the specs repo path containing the swagger definitions.
> 4. Run `npm run generate-single {basePath}` to generate schemas for them. Save the console output to file.
> 5. Manually remove any existing references to your provider namespace (if any) from [schemas/2019-04-01/deploymentTemplate.> json](/schemas/2019-04-01/deploymentTemplate.json).
> 6. Add the {basePath} to the autogenlist array in [autogenlist.ts](./autogenlist.ts).
> 7. Commit all the changed files, and submit a PR to this repo with title "Onboarding {provider} for autogeneration". Include > the full output saved in step 2 as a comment.
> 8. Ensure all CI tests pass, and ask the team to review the PR (including tool output) to ensure that all expected resources > have been detected and generated as expected.
242 changes: 233 additions & 9 deletions generator/autogenlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,224 @@ import { postProcessor as policyProcessor } from './processors/Microsoft.Authori
import { postProcessor as securityInsightsPostProcessor } from './processors/Microsoft.SecurityInsights';
import { lowerCaseEquals } from './utils';

// New providers are onboarded by default. The providers listed here are the only ones **not** onboarded.
const disabledProviders: AutoGenConfig[] = [
{
basePath: 'advisor/resource-manager',
namespace: 'Microsoft.Advisor',
disabledForAutogen: true,
},
{
basePath: 'agrifood/resource-manager',
namespace: 'Microsoft.AgFoodPlatform',
disabledForAutogen: true,
},
{
basePath: 'azure-kusto/resource-manager',
namespace: 'Microsoft.Kusto',
disabledForAutogen: true,
},
{
basePath: 'azurestackhci/resource-manager',
namespace: 'Microsoft.AzureStackHCI',
disabledForAutogen: true,
},
{
basePath: 'baremetalinfrastructure/resource-manager',
namespace: 'Microsoft.BareMetalInfrastructure',
disabledForAutogen: true,
},
{
basePath: 'cloudshell/resource-manager',
namespace: 'Microsoft.Portal',
disabledForAutogen: true,
},
{
basePath: 'compute/resource-manager',
namespace: 'Microsoft.Compute',
disabledForAutogen: true,
},
{
basePath: 'compute/resource-manager',
namespace: 'Microsoft.ContainerService',
disabledForAutogen: true,
},
{
basePath: 'confidentialledger/resource-manager',
namespace: 'Microsoft.ConfidentialLedger',
disabledForAutogen: true,
},
{
basePath: 'cost-management/resource-manager',
namespace: 'Microsoft.CostManagement',
disabledForAutogen: true,
},
{
basePath: 'cpim/resource-manager',
namespace: 'Microsoft.AzureActiveDirectory',
disabledForAutogen: true,
},
{
basePath: 'dataprotection/resource-manager',
namespace: 'Microsoft.DataProtection',
disabledForAutogen: true,
},
{
// Disabled as the swagger spec contains a type ("DateTimeRfc1123") which autorest is unable to parse: https://github.com/Azure/autorest.azureresourceschema/issues/71
basePath: 'domainservices/resource-manager',
namespace: 'Microsoft.AAD',
disabledForAutogen: true,
},
{
basePath: 'dfp/resource-manager',
namespace: 'Microsoft.Dynamics365Fraudprotection',
disabledForAutogen: true,
},
{
basePath: 'dnc/resource-manager',
namespace: 'Microsoft.DelegatedNetwork',
disabledForAutogen: true,
},
{
basePath: 'dns/resource-manager',
namespace: 'Microsoft.Network',
disabledForAutogen: true,
},
{
basePath: 'edgeorder/resource-manager',
namespace: 'Microsoft.EdgeOrder',
disabledForAutogen: true,
},
{
basePath: 'edgeorderpartner/resource-manager',
namespace: 'Microsoft.EdgeOrderPartner',
disabledForAutogen: true,
},
{
basePath: 'extendedlocation/resource-manager',
namespace: 'Microsoft.ExtendedLocation',
disabledForAutogen: true,
},
{
basePath: 'fluidrelay/resource-manager',
namespace: 'Microsoft.FluidRelay',
disabledForAutogen: true,
},
{
basePath: 'iotsecurity/resource-manager',
namespace: 'Microsoft.IoTSecurity',
disabledForAutogen: true,
},
{
basePath: 'logic/resource-manager',
namespace: 'Microsoft.Logic',
disabledForAutogen: true,
},
{
basePath: 'm365securityandcompliance/resource-manager',
namespace: 'Microsoft.M365SecurityAndCompliance',
disabledForAutogen: true,
},
{
basePath: 'managedservices/resource-manager',
namespace: 'Microsoft.ManagedServices',
disabledForAutogen: true,
},
{
basePath: 'marketplacenotifications/resource-manager',
namespace: 'Microsoft.MarketplaceNotifications',
disabledForAutogen: true,
},
{
basePath: 'marketplaceordering/resource-manager',
namespace: 'Microsoft.MarketplaceOrdering',
disabledForAutogen: true,
},
{
basePath: 'mediaservices/resource-manager',
namespace: 'Microsoft.Media',
disabledForAutogen: true,
},
{
basePath: 'msi/resource-manager',
namespace: 'Microsoft.ManagedIdentity',
disabledForAutogen: true,
},
{
basePath: 'network/resource-manager',
namespace: 'Microsoft.Network',
disabledForAutogen: true,
},
{
basePath: 'operationsmanagement/resource-manager',
namespace: 'Microsoft.OperationsManagement',
disabledForAutogen: true,
},
{
basePath: 'privatedns/resource-manager',
namespace: 'Microsoft.Network',
disabledForAutogen: true,
},
{
basePath: 'providerhub/resource-manager',
namespace: 'Microsoft.ProviderHub',
disabledForAutogen: true,
},
{
basePath: 'quota/resource-manager',
namespace: 'Microsoft.Quota',
disabledForAutogen: true,
},
{
basePath: 'resources/resource-manager',
namespace: 'Microsoft.Features',
disabledForAutogen: true,
},
{
basePath: 'resources/resource-manager',
namespace: 'Microsoft.Solutions',
disabledForAutogen: true,
},
{
basePath: 'securityandcompliance/resource-manager',
namespace: 'Microsoft.SecurityAndCompliance',
disabledForAutogen: true,
},
{
basePath: 'service-map/resource-manager',
namespace: 'Microsoft.OperationalInsights',
disabledForAutogen: true,
},
{
basePath: 'servicefabricmanagedclusters/resource-manager',
namespace: 'Microsoft.ServiceFabricManagedClusters',
disabledForAutogen: true,
},
{
basePath: 'testbase/resource-manager',
namespace: 'Microsoft.TestBase',
disabledForAutogen: true,
},
{
basePath: 'trafficmanager/resource-manager',
namespace: 'Microsoft.Network',
disabledForAutogen: true,
},
{
basePath: 'videoanalyzer/resource-manager',
namespace: 'Microsoft.Media',
disabledForAutogen: true,
},
{
basePath: 'webpubsub/resource-manager',
namespace: 'Microsoft.SignalRService',
disabledForAutogen: true,
},
];

// Run "npm run list-basepaths" to discover all the valid readme files to add to this list
const autoGenList: AutoGenConfig[] = [
...disabledProviders,
{
basePath: 'addons/resource-manager',
namespace: 'Microsoft.Addons',
Expand Down Expand Up @@ -268,10 +484,6 @@ const autoGenList: AutoGenConfig[] = [
basePath: 'EnterpriseKnowledgeGraph/resource-manager',
namespace: 'Microsoft.EnterpriseKnowledgeGraph',
},
/*{ NOTE(jcotillo): Temporally removing this RP - latest swagger contains an unsupported type by the schema generator tool
basePath: 'domainservices/resource-manager',
namespace: 'Microsoft.AAD',
},*/
{
basePath: 'eventhub/resource-manager',
namespace: 'Microsoft.EventHub',
Expand Down Expand Up @@ -827,13 +1039,25 @@ const autoGenList: AutoGenConfig[] = [
{
basePath: 'deviceupdate/resource-manager',
namespace: 'Microsoft.DeviceUpdate',
}
},
];

export function getAutoGenList(): AutoGenConfig[] {
return autoGenList;
}

export function findAutogenEntries(basePath: string): AutoGenConfig[] {
return autoGenList.filter(w => lowerCaseEquals(w.basePath, basePath));
}

export function findOrGenerateAutogenEntries(basePath: string, namespaces: string[]): AutoGenConfig[] {
const entries = findAutogenEntries(basePath).filter(e => namespaces.some(ns => lowerCaseEquals(e.namespace, ns)));

for (const namespace of namespaces) {
if (!entries.some(e => lowerCaseEquals(e.namespace, namespace))) {
// Generate configuration for any RPs not explicitly declared in the autogen list
entries.push({
basePath,
namespace,
});
}
}

return entries;
}
2 changes: 1 addition & 1 deletion generator/cmd/findbasepath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ executeSynchronous(async () => {

const autoGenEntries = findAutogenEntries(basePath);

if (autoGenEntries.length === 0) {
if (autoGenEntries[0]?.disabledForAutogen === true) {
// not onboarded in autogeneration
console.log("false");
return;
Expand Down
Loading