From e342eb2dd13b2ed4815ae9bd618a34e7ef0cc252 Mon Sep 17 00:00:00 2001 From: Srikanta <51379715+srnagar@users.noreply.github.com> Date: Tue, 8 Jun 2021 12:17:51 -0700 Subject: [PATCH] Update swagger for Azure Monitor metrics query (#14609) * Update swaggers for logs and metrics queries * Update version * add missing fields * include statistics * include statistics * statistics in log query result * Include metrics namespace param * Update title and client name * Include namespace param * Add namespace and region * Fix top and orderby query params * Fix linting errors * Update security to oauth2 * Remove logs query changes * Update 2018-01-01 version and revert 2017-05-01-preview --- .../preview/2017-12-01-preview/metricNamespaces_API.json | 5 +---- .../stable/2018-01-01/metricDefinitions_API.json | 4 ++-- .../Microsoft.Insights/stable/2018-01-01/metrics_API.json | 7 ++----- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json index 37567b416cb7..1b999fa03926 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json @@ -2,9 +2,6 @@ "swagger": "2.0", "info": { "title": "MonitorManagementClient", - "x-ms-code-generation-settings": { - "name": "MonitorManagementClient" - }, "version": "2017-12-01-preview" }, "host": "management.azure.com", @@ -99,7 +96,7 @@ ], "x-ms-enum": { "name": "NamespaceClassification", - "modelAsString": false + "modelAsString": true } }, "MetricNamespace": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json index ac4c7d13b005..c31a95ffd085 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json @@ -133,8 +133,8 @@ "BitsPerSecond" ], "x-ms-enum": { - "name": "Unit", - "modelAsString": false + "name": "MetricUnit", + "modelAsString": true } }, "AggregationType": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json index 8f531f663b66..3f1ba6e80cb9 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json @@ -2,9 +2,6 @@ "swagger": "2.0", "info": { "title": "MonitorManagementClient", - "x-ms-code-generation-settings": { - "name": "MonitorManagementClient" - }, "version": "2018-01-01" }, "host": "management.azure.com", @@ -144,8 +141,8 @@ "BitsPerSecond" ], "x-ms-enum": { - "name": "Unit", - "modelAsString": false + "name": "MetricUnit", + "modelAsString": true } }, "MetricValue": {