From b5702b7d62e824b5cabd4b507dc794e81c873642 Mon Sep 17 00:00:00 2001 From: Suriyha <52430352+Suriyha@users.noreply.github.com> Date: Wed, 2 Dec 2020 19:10:15 -0800 Subject: [PATCH] Fix Analysis Services for Swagger Completeness (#11638) * Fix Analysis Services for Swagger Completeness * Fix for lintdiff issues * Change schema to error * Default schema change * Adding title and description * Add separator * Some changes to address R4018 * Fix parameter * Move parameter * Remove a parameter * Fix quotes bug * Add required parameters to address R4018 * More updates to Operations API response schema * Cleaner schema change following the example schema under R4018 * Fix for prettier tool --- .../stable/2016-05-16/analysisservices.json | 105 ++++++++++++++++++ .../stable/2017-07-14/analysisservices.json | 105 ++++++++++++++++++ 2 files changed, 210 insertions(+) diff --git a/specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2016-05-16/analysisservices.json b/specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2016-05-16/analysisservices.json index b2a71a5ff758..b2d670d39ea3 100644 --- a/specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2016-05-16/analysisservices.json +++ b/specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2016-05-16/analysisservices.json @@ -550,9 +550,103 @@ } } } + }, + "/providers/Microsoft.AnalysisServices/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available consumption REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/OperationsErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { + "OperationDisplay": { + "description": "The object that represents the operation.", + "type": "object", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Consumption.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: UsageDetail, etc.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Description for the operation", + "type": "string" + } + } + }, + "OperationDetail": { + "description": "A Consumption REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "Display of the operation" + } + } + }, + "OperationListResult": { + "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "description": "List of analysis services operations supported by the Microsoft.AnalysisServices resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/OperationDetail" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, "Resource": { "description": "Represents an instance of an Analysis Services resource.", "type": "object", @@ -867,7 +961,18 @@ } } }, + "OperationsErrorResponse": { + "properties": { + "error": { + "$ref": "#/definitions/ErrorResponse", + "title": "OperationsErrorResponse", + "description": "Error message from Operations." + } + }, + "description": "An error response from Operations." + }, "ErrorResponse": { + "title": "ErrorResponse", "description": "Describes the format of Error response.", "type": "object", "properties": { diff --git a/specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2017-07-14/analysisservices.json b/specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2017-07-14/analysisservices.json index 3da01dddbff3..c5fbdea3bcf2 100644 --- a/specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2017-07-14/analysisservices.json +++ b/specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2017-07-14/analysisservices.json @@ -639,9 +639,103 @@ } } } + }, + "/providers/Microsoft.AnalysisServices/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available consumption REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/OperationsErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { + "OperationDisplay": { + "description": "The object that represents the operation.", + "type": "object", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Consumption.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: UsageDetail, etc.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Description for the operation", + "type": "string" + } + } + }, + "OperationDetail": { + "description": "A Consumption REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "Display of the operation" + } + } + }, + "OperationListResult": { + "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "description": "List of analysis services operations supported by the Microsoft.AnalysisServices resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/OperationDetail" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, "Resource": { "description": "Represents an instance of an Analysis Services resource.", "type": "object", @@ -1021,7 +1115,18 @@ } } }, + "OperationsErrorResponse": { + "properties": { + "error": { + "$ref": "#/definitions/ErrorResponse", + "title": "OperationsErrorResponse", + "description": "Error message from Operations." + } + }, + "description": "An error response from Operations." + }, "ErrorResponse": { + "title": "ErrorResponse", "description": "Describes the format of Error response.", "type": "object", "properties": {