From aa13eaed0cb27fbf259ccd41805eaa08605dcc14 Mon Sep 17 00:00:00 2001 From: Daisy Zhou Date: Tue, 3 May 2022 15:46:49 -0700 Subject: [PATCH 1/5] modify api version of ReplicationLinks in swagger file --- specification/sql/resource-manager/readme.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 6fd5a54ace5d..a251dbab8b27 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -164,7 +164,6 @@ input-file: - Microsoft.Sql/stable/2014-04-01/dataMasking.json - Microsoft.Sql/stable/2014-04-01/geoBackupPolicies.json - Microsoft.Sql/stable/2014-04-01/metrics.json -- Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json - Microsoft.Sql/stable/2014-04-01/serverCommunicationLinks.json - Microsoft.Sql/stable/2014-04-01/serviceObjectives.json - Microsoft.Sql/stable/2014-04-01-legacy/sql.core_legacy.json @@ -273,7 +272,7 @@ input-file: - ./Microsoft.Sql/preview/2021-08-01-preview/ElasticPools.json - ./Microsoft.Sql/preview/2021-11-01-preview/IPv6FirewallRules.json - ./Microsoft.Sql/preview/2021-11-01-preview/EndpointCertificates.json -- ./Microsoft.Sql/preview/2021-02-01-preview/ReplicationLinks.json +- ./Microsoft.Sql/preview/2021-11-01-preview/ReplicationLinks.json - ./Microsoft.Sql/preview/2020-11-01-preview/ManagedDatabaseSensitivityLabels.json - ./Microsoft.Sql/preview/2020-11-01-preview/SensitivityLabels.json - ./Microsoft.Sql/preview/2021-11-01-preview/BlobAuditing.json From 386d461f46432434e770eecae2af265e54ac5dda Mon Sep 17 00:00:00 2001 From: Daisy Zhou Date: Tue, 3 May 2022 16:12:55 -0700 Subject: [PATCH 2/5] remove example fils referenced by old legacy version --- .../examples/ReplicationLinkDelete.json | 14 -------------- .../examples/ReplicationLinkFailover.json | 14 -------------- .../examples/ReplicationLinkUnlink.json | 17 ----------------- .../replicationLinks_legacy.json | 8 ++++---- 4 files changed, 4 insertions(+), 49 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json deleted file mode 100644 index ebac700be866..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "sqlcrudtest-4799", - "serverName": "sqlcrudtest-6440", - "databaseName": "testdb", - "linkId": "5b301b68-03f6-4b26-b0f4-73ebb8634238", - "api-version": "2014-04-01" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json deleted file mode 100644 index ce5ed3665178..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "sqlcrudtest-8931", - "serverName": "sqlcrudtest-2137", - "databaseName": "testdb", - "linkId": "f0550bf5-07ce-4270-8e4b-71737975973a", - "api-version": "2014-04-01" - }, - "responses": { - "202": {}, - "204": {} - } -} diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json deleted file mode 100644 index 0b4701fa8353..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "sqlcrudtest-8931", - "serverName": "sqlcrudtest-2137", - "databaseName": "testdb", - "linkId": "f0550bf5-07ce-4270-8e4b-71737975973a", - "api-version": "2014-04-01", - "parameters": { - "forcedTermination": true - } - }, - "responses": { - "202": {}, - "204": {} - } -} diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json index 92d38a3738dd..bef1925ab004 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json +++ b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json @@ -25,7 +25,7 @@ "description": "Deletes a database replication link. Cannot be done during failover.", "x-ms-examples": { "Delete a replication link": { - "$ref": "./examples/ReplicationLinkDelete.json" + "$ref": "" } }, "parameters": [ @@ -75,7 +75,7 @@ "description": "Sets which replica database is primary by failing over from the current primary replica database.", "x-ms-examples": { "Failover a replication link": { - "$ref": "./examples/ReplicationLinkFailover.json" + "$ref": "" } }, "parameters": [ @@ -126,7 +126,7 @@ "description": "Sets which replica database is primary by failing over from the current primary replica database. This operation might result in data loss.", "x-ms-examples": { "Failover a replication link": { - "$ref": "./examples/ReplicationLinkFailover.json" + "$ref": "" } }, "parameters": [ @@ -177,7 +177,7 @@ "description": "Deletes a database replication link in forced or friendly way.", "x-ms-examples": { "Delete replication link": { - "$ref": "./examples/ReplicationLinkUnlink.json" + "$ref": "" } }, "parameters": [ From 74f43c5744cfa04d38103de8f1622c159fd10b58 Mon Sep 17 00:00:00 2001 From: Daisy Zhou Date: Tue, 3 May 2022 17:15:41 -0700 Subject: [PATCH 3/5] remove x-ms-examples sections which referencing to nothing --- .../replicationLinks_legacy.json | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json index bef1925ab004..8090f9c05a1a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json +++ b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json @@ -23,11 +23,6 @@ ], "operationId": "ReplicationLinks_Delete", "description": "Deletes a database replication link. Cannot be done during failover.", - "x-ms-examples": { - "Delete a replication link": { - "$ref": "" - } - }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -73,11 +68,6 @@ ], "operationId": "ReplicationLinks_Failover", "description": "Sets which replica database is primary by failing over from the current primary replica database.", - "x-ms-examples": { - "Failover a replication link": { - "$ref": "" - } - }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -124,11 +114,6 @@ ], "operationId": "ReplicationLinks_FailoverAllowDataLoss", "description": "Sets which replica database is primary by failing over from the current primary replica database. This operation might result in data loss.", - "x-ms-examples": { - "Failover a replication link": { - "$ref": "" - } - }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -175,11 +160,6 @@ ], "operationId": "ReplicationLinks_Unlink", "description": "Deletes a database replication link in forced or friendly way.", - "x-ms-examples": { - "Delete replication link": { - "$ref": "" - } - }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" From f767efbbd933b4efe70f79b6fa3424f6848e71ef Mon Sep 17 00:00:00 2001 From: Daisy Zhou Date: Fri, 6 May 2022 11:16:08 -0700 Subject: [PATCH 4/5] add back example files --- .../examples/ReplicationLinkDelete.json | 14 +++++++++++++ .../examples/ReplicationLinkFailover.json | 14 +++++++++++++ .../examples/ReplicationLinkUnlink.json | 17 ++++++++++++++++ .../replicationLinks_legacy.json | 20 +++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json new file mode 100644 index 000000000000..bba8787695e7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-4799", + "serverName": "sqlcrudtest-6440", + "databaseName": "testdb", + "linkId": "5b301b68-03f6-4b26-b0f4-73ebb8634238", + "api-version": "2014-04-01" + }, + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json new file mode 100644 index 000000000000..eee43014a37a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-8931", + "serverName": "sqlcrudtest-2137", + "databaseName": "testdb", + "linkId": "f0550bf5-07ce-4270-8e4b-71737975973a", + "api-version": "2014-04-01" + }, + "responses": { + "202": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json new file mode 100644 index 000000000000..2cc53a459150 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "sqlcrudtest-8931", + "serverName": "sqlcrudtest-2137", + "databaseName": "testdb", + "linkId": "f0550bf5-07ce-4270-8e4b-71737975973a", + "api-version": "2014-04-01", + "parameters": { + "forcedTermination": true + } + }, + "responses": { + "202": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json index 8090f9c05a1a..92d38a3738dd 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json +++ b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/replicationLinks_legacy.json @@ -23,6 +23,11 @@ ], "operationId": "ReplicationLinks_Delete", "description": "Deletes a database replication link. Cannot be done during failover.", + "x-ms-examples": { + "Delete a replication link": { + "$ref": "./examples/ReplicationLinkDelete.json" + } + }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -68,6 +73,11 @@ ], "operationId": "ReplicationLinks_Failover", "description": "Sets which replica database is primary by failing over from the current primary replica database.", + "x-ms-examples": { + "Failover a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -114,6 +124,11 @@ ], "operationId": "ReplicationLinks_FailoverAllowDataLoss", "description": "Sets which replica database is primary by failing over from the current primary replica database. This operation might result in data loss.", + "x-ms-examples": { + "Failover a replication link": { + "$ref": "./examples/ReplicationLinkFailover.json" + } + }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" @@ -160,6 +175,11 @@ ], "operationId": "ReplicationLinks_Unlink", "description": "Deletes a database replication link in forced or friendly way.", + "x-ms-examples": { + "Delete replication link": { + "$ref": "./examples/ReplicationLinkUnlink.json" + } + }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" From 5f61d456a9572939096c918f4f01c49f28694d54 Mon Sep 17 00:00:00 2001 From: Daisy Zhou Date: Fri, 6 May 2022 11:20:36 -0700 Subject: [PATCH 5/5] add new line at end of example files --- .../2014-04-01-legacy/examples/ReplicationLinkDelete.json | 2 +- .../2014-04-01-legacy/examples/ReplicationLinkFailover.json | 2 +- .../2014-04-01-legacy/examples/ReplicationLinkUnlink.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json index bba8787695e7..ebac700be866 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkDelete.json @@ -11,4 +11,4 @@ "200": {}, "204": {} } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json index eee43014a37a..ce5ed3665178 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json +++ b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkFailover.json @@ -11,4 +11,4 @@ "202": {}, "204": {} } -} \ No newline at end of file +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json index 2cc53a459150..0b4701fa8353 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json +++ b/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ReplicationLinkUnlink.json @@ -14,4 +14,4 @@ "202": {}, "204": {} } -} \ No newline at end of file +}