From 283dd30cbeffab25d2142c2b89a705b7a4e2bd0b Mon Sep 17 00:00:00 2001 From: Sena Gungor Date: Sat, 15 Jul 2023 02:57:51 +0300 Subject: [PATCH 1/3] Onboard postgresqlhsc --- generator/autogenlist.ts | 4 + .../2022-11-08/Microsoft.DBforPostgreSQL.json | 920 ++++++++++++++++++ schemas/common/autogeneratedResources.json | 18 + 3 files changed, 942 insertions(+) create mode 100644 schemas/2022-11-08/Microsoft.DBforPostgreSQL.json diff --git a/generator/autogenlist.ts b/generator/autogenlist.ts index b76b500009..ef3ceca98b 100644 --- a/generator/autogenlist.ts +++ b/generator/autogenlist.ts @@ -681,6 +681,10 @@ const autoGenList: AutoGenConfig[] = [ basePath: 'postgresql/resource-manager', namespace: 'Microsoft.DBforPostgreSQL', }, + { + basePath: 'postgresqlhsc/resource-manager', + namespace: 'Microsoft.DBforPostgreSQL', + }, { basePath: 'powerbiembedded/resource-manager', namespace: 'Microsoft.PowerBI', diff --git a/schemas/2022-11-08/Microsoft.DBforPostgreSQL.json b/schemas/2022-11-08/Microsoft.DBforPostgreSQL.json new file mode 100644 index 0000000000..47a961f191 --- /dev/null +++ b/schemas/2022-11-08/Microsoft.DBforPostgreSQL.json @@ -0,0 +1,920 @@ +{ + "id": "https://schema.management.azure.com/schemas/2022-11-08/Microsoft.DBforPostgreSQL.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.DBforPostgreSQL", + "description": "Microsoft DBforPostgreSQL Resource Types", + "resourceDefinitions": { + "serverGroupsv2": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-11-08" + ] + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives" + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^(?![0-9]+$)(?!-)[a-z0-9-]{3,40}(? Date: Tue, 25 Jul 2023 11:42:14 -0400 Subject: [PATCH 2/3] Add suffix to autogen config --- .vscode/launch.json | 1 + generator/autogenlist.ts | 1 + .../2022-11-08/Microsoft.DBforPostgreSQL.json | 920 ------------------ schemas/common/autogeneratedResources.json | 18 - 4 files changed, 2 insertions(+), 938 deletions(-) delete mode 100644 schemas/2022-11-08/Microsoft.DBforPostgreSQL.json diff --git a/.vscode/launch.json b/.vscode/launch.json index cd5b5007f5..37fef624a8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -25,6 +25,7 @@ "cwd": "${workspaceFolder}/generator", "args": [ "${workspaceFolder}/generator/cmd/generatesingle.ts", + "--base-path", "${input:resourceProvider}/resource-manager" ] }, diff --git a/generator/autogenlist.ts b/generator/autogenlist.ts index ef3ceca98b..5e46138c55 100644 --- a/generator/autogenlist.ts +++ b/generator/autogenlist.ts @@ -684,6 +684,7 @@ const autoGenList: AutoGenConfig[] = [ { basePath: 'postgresqlhsc/resource-manager', namespace: 'Microsoft.DBforPostgreSQL', + suffix: 'Hsc', }, { basePath: 'powerbiembedded/resource-manager', diff --git a/schemas/2022-11-08/Microsoft.DBforPostgreSQL.json b/schemas/2022-11-08/Microsoft.DBforPostgreSQL.json deleted file mode 100644 index 47a961f191..0000000000 --- a/schemas/2022-11-08/Microsoft.DBforPostgreSQL.json +++ /dev/null @@ -1,920 +0,0 @@ -{ - "id": "https://schema.management.azure.com/schemas/2022-11-08/Microsoft.DBforPostgreSQL.json#", - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Microsoft.DBforPostgreSQL", - "description": "Microsoft DBforPostgreSQL Resource Types", - "resourceDefinitions": { - "serverGroupsv2": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "enum": [ - "2022-11-08" - ] - }, - "location": { - "type": "string", - "description": "The geo-location where the resource lives" - }, - "name": { - "oneOf": [ - { - "type": "string", - "pattern": "^(?![0-9]+$)(?!-)[a-z0-9-]{3,40}(? Date: Tue, 25 Jul 2023 12:19:05 -0400 Subject: [PATCH 3/3] Regenerate schemas wit suffix --- .../Microsoft.DBforPostgreSQL.Hsc.json | 920 ++++++++++++++++++ schemas/common/autogeneratedResources.json | 18 + 2 files changed, 938 insertions(+) create mode 100644 schemas/2022-11-08/Microsoft.DBforPostgreSQL.Hsc.json diff --git a/schemas/2022-11-08/Microsoft.DBforPostgreSQL.Hsc.json b/schemas/2022-11-08/Microsoft.DBforPostgreSQL.Hsc.json new file mode 100644 index 0000000000..afcb05489e --- /dev/null +++ b/schemas/2022-11-08/Microsoft.DBforPostgreSQL.Hsc.json @@ -0,0 +1,920 @@ +{ + "id": "https://schema.management.azure.com/schemas/2022-11-08/Microsoft.DBforPostgreSQL.Hsc.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.DBforPostgreSQL", + "description": "Microsoft DBforPostgreSQL Resource Types", + "resourceDefinitions": { + "serverGroupsv2": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2022-11-08" + ] + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives" + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^(?![0-9]+$)(?!-)[a-z0-9-]{3,40}(?