From 8226eaf981161524b6221db678b803c70479db85 Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Wed, 13 Jan 2021 17:43:27 +0800 Subject: [PATCH 1/3] Revert "Remove $ref from apimanagement examples" This reverts commit 041424ecac074b5f9d6eccd41d6aefb35cdb9e8f. --- .../ApiManagementCreateContentType.json | 27 ++++++++++++++----- .../examples/ApiManagementGetContentType.json | 9 +++++-- .../ApiManagementListContentTypes.json | 9 +++++-- .../ApiManagementCreateContentType.json | 27 ++++++++++++++----- .../ApiManagementListContentTypes.json | 9 +++++-- .../readme.azureresourceschema.md | 4 +-- 6 files changed, 65 insertions(+), 20 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateContentType.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateContentType.json index 8834d81790cb..3cf06c82f045 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateContentType.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateContentType.json @@ -12,6 +12,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -51,8 +57,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" } @@ -70,6 +75,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -109,8 +120,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" } @@ -127,6 +137,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -166,8 +182,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetContentType.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetContentType.json index 3cbf82f676cb..29df6bd12047 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetContentType.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetContentType.json @@ -18,6 +18,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -57,8 +63,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListContentTypes.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListContentTypes.json index 077412fcfbd1..38d5274c8ad4 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListContentTypes.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListContentTypes.json @@ -19,6 +19,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -58,8 +64,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2019-12-01/examples/ApiManagementCreateContentType.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2019-12-01/examples/ApiManagementCreateContentType.json index 8ff951e395bc..1ef1cbc9f30f 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2019-12-01/examples/ApiManagementCreateContentType.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2019-12-01/examples/ApiManagementCreateContentType.json @@ -12,6 +12,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -51,8 +57,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" } @@ -70,6 +75,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -109,8 +120,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" } @@ -127,6 +137,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -166,8 +182,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" } diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2019-12-01/examples/ApiManagementListContentTypes.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2019-12-01/examples/ApiManagementListContentTypes.json index fe7ccc552877..4a008fed1b45 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2019-12-01/examples/ApiManagementListContentTypes.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2019-12-01/examples/ApiManagementListContentTypes.json @@ -19,6 +19,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -58,8 +64,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" } diff --git a/specification/apimanagement/resource-manager/readme.azureresourceschema.md b/specification/apimanagement/resource-manager/readme.azureresourceschema.md index 99e3ce1ce490..82517e62c83a 100644 --- a/specification/apimanagement/resource-manager/readme.azureresourceschema.md +++ b/specification/apimanagement/resource-manager/readme.azureresourceschema.md @@ -6,9 +6,9 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: - - tag: schema-apimanagement-2020-06-01-preview + # - tag: schema-apimanagement-2020-06-01-preview - tag: schema-apimanagement-2019-12-01-preview - - tag: schema-apimanagement-2019-12-01 + # - tag: schema-apimanagement-2019-12-01 - tag: schema-apimanagement-2019-01-01 - tag: schema-apimanagement-2018-06-01-preview - tag: schema-apimanagement-2018-01-01 From d37144c1ec62a46fa38179edf13f7365085112be Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Wed, 13 Jan 2021 17:44:16 +0800 Subject: [PATCH 2/3] update apimanagement readme.azureresourceschema.md --- .../resource-manager/readme.azureresourceschema.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/apimanagement/resource-manager/readme.azureresourceschema.md b/specification/apimanagement/resource-manager/readme.azureresourceschema.md index 82517e62c83a..2a4dccfeee07 100644 --- a/specification/apimanagement/resource-manager/readme.azureresourceschema.md +++ b/specification/apimanagement/resource-manager/readme.azureresourceschema.md @@ -6,9 +6,9 @@ These settings apply only when `--azureresourceschema` is specified on the comma ``` yaml $(azureresourceschema) && $(multiapi) batch: - # - tag: schema-apimanagement-2020-06-01-preview + - tag: schema-apimanagement-2020-06-01-preview - tag: schema-apimanagement-2019-12-01-preview - # - tag: schema-apimanagement-2019-12-01 + - tag: schema-apimanagement-2019-12-01 - tag: schema-apimanagement-2019-01-01 - tag: schema-apimanagement-2018-06-01-preview - tag: schema-apimanagement-2018-01-01 @@ -51,12 +51,14 @@ input-file: - Microsoft.ApiManagement/preview/2020-06-01-preview/apimopenidconnectproviders.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimpolicies.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimpolicydescriptions.json + - Microsoft.ApiManagement/preview/2020-06-01-preview/apimportalrevisions.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimportalsettings.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimproducts.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimproductsByTags.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimquotas.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimregions.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimreports.json + - Microsoft.ApiManagement/preview/2020-06-01-preview/apimsettings.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimsubscriptions.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimtagresources.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimtags.json From 160c988ddf8b9c4b2ffea20ca890f8a9714c83b0 Mon Sep 17 00:00:00 2001 From: Lei Ni Date: Thu, 25 Feb 2021 13:29:04 +0800 Subject: [PATCH 3/3] manually restore for 2020-12-01 example --- .../examples/ApiManagementCreateContentType.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2020-12-01/examples/ApiManagementCreateContentType.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2020-12-01/examples/ApiManagementCreateContentType.json index e8632babad92..5a0de75a8fdd 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2020-12-01/examples/ApiManagementCreateContentType.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2020-12-01/examples/ApiManagementCreateContentType.json @@ -12,6 +12,12 @@ "schema": { "properties": { "en_us": { + "$ref": "#/definitions/metadata" + } + }, + "additionalProperties": false, + "definitions": { + "metadata": { "type": "object", "properties": { "title": { @@ -51,8 +57,7 @@ "documentId" ] } - }, - "additionalProperties": false + } }, "version": "1.0.0" }