From 0529893d14aaaa4b68467650476c9ce23e065192 Mon Sep 17 00:00:00 2001 From: Ankita Rudrawar Date: Mon, 1 Feb 2021 18:53:53 -0800 Subject: [PATCH] Fix Swagger Correctness Issues For HealthcareApis (#12651) * Initial commit * Fix model validation * Fix typo --- .../examples/OperationsList.json | 6 +++ .../examples/ServiceCreate.json | 13 ++++++ .../2018-08-20-preview/healthcare-apis.json | 41 +++++++++++++++++++ .../examples/OperationResultsGet.json | 1 + .../2019-09-16/examples/OperationsList.json | 6 +++ .../stable/2019-09-16/healthcare-apis.json | 16 ++++++++ .../examples/OperationResultsGet.json | 1 + .../2020-03-15/examples/OperationsList.json | 6 +++ .../stable/2020-03-15/healthcare-apis.json | 16 ++++++++ .../2020-03-30/examples/OperationsList.json | 6 +++ .../2020-03-30/examples/ServicePatch.json | 3 +- .../stable/2020-03-30/healthcare-apis.json | 16 ++++++++ 12 files changed, 130 insertions(+), 1 deletion(-) diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/examples/OperationsList.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/examples/OperationsList.json index 6db8a90e864e..c351dfd924c0 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/examples/OperationsList.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/examples/OperationsList.json @@ -8,21 +8,25 @@ "value": [ { "name": "Microsoft.HealthcareApis/services/read", + "isDataAction": false, "display": {}, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/services/write", + "isDataAction": false, "display": {}, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/services/delete", + "isDataAction": false, "display": {}, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/locations/operationresults/read", + "isDataAction": false, "display": { "provider": "Microsoft.HealthcareApis", "resource": "operationresults", @@ -33,11 +37,13 @@ }, { "name": "Microsoft.HealthcareApis/checkNameAvailability/post", + "isDataAction": false, "display": {}, "origin": "user" }, { "name": "Microsoft.HealthcareApis/Operations/read", + "isDataAction": false, "display": { "provider": "Microsoft.HealthcareApis", "resource": "operations", diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/examples/ServiceCreate.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/examples/ServiceCreate.json index 51ee6ed9cae2..4a62527ae803 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/examples/ServiceCreate.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/examples/ServiceCreate.json @@ -43,6 +43,9 @@ "maxAge": 1440, "allowCredentials": false } + }, + "identity": { + "type": "SystemAssigned" } } }, @@ -92,6 +95,11 @@ "maxAge": 1440, "allowCredentials": false } + }, + "identity": { + "principalId": "03fe6ae0-952c-4e4b-954b-cc0364dd252e", + "tenantId": "72f988bf-86f1-41af-91ab-2d8cd011db47", + "type": "SystemAssigned" } } }, @@ -140,6 +148,11 @@ "maxAge": 1440, "allowCredentials": false } + }, + "identity": { + "principalId": "03fe6ae0-952c-4e4b-954b-cc0364dd252e", + "tenantId": "72f988bf-86f1-41af-91ab-2d8cd011db47", + "type": "SystemAssigned" } } } diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/healthcare-apis.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/healthcare-apis.json index 2406d481db5a..7e23cf7a5828 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/healthcare-apis.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/preview/2018-08-20-preview/healthcare-apis.json @@ -674,6 +674,34 @@ "etag": { "description": "An etag associated with the resource, used for optimistic concurrency when editing it.", "type": "string" + }, + "identity": { + "type": "object", + "description": "Setting indicating whether the service has a managed identity associated with it.", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of the resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of the resource." + }, + "type": { + "description": "Type of identity being specified, currently SystemAssigned and None are allowed.", + "type": "string", + "enum": [ + "SystemAssigned", + "None" + ], + "x-ms-enum": { + "name": "ManagedServiceIdentityType", + "modelAsString": true + } + } + } } }, "x-ms-azure-resource": true, @@ -757,6 +785,10 @@ "type": "string", "description": "Operation name: {provider}/{resource}/{read | write | action | delete}" }, + "isDataAction": { + "description": "Gets or sets a value indicating whether the operation is a data action or not", + "type": "boolean" + }, "origin": { "readOnly": true, "type": "string", @@ -765,6 +797,10 @@ "display": { "description": "The information displayed about the operation.", "$ref": "#/definitions/OperationDisplay" + }, + "properties": { + "$ref": "#/definitions/OperationProperties", + "description": "Properties of the operation" } } }, @@ -794,6 +830,11 @@ } } }, + "OperationProperties": { + "description": "Operation properties.", + "type": "object", + "properties": {} + }, "CheckNameAvailabilityParameters": { "description": "Input values.", "type": "object", diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/examples/OperationResultsGet.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/examples/OperationResultsGet.json index 86e0b9e3761c..bc4582b4187a 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/examples/OperationResultsGet.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/examples/OperationResultsGet.json @@ -15,6 +15,7 @@ "properties": {} } }, + "202": {}, "404": { "body": { "error": { diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/examples/OperationsList.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/examples/OperationsList.json index 60f0733d9c97..430d1db21929 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/examples/OperationsList.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/examples/OperationsList.json @@ -8,21 +8,25 @@ "value": [ { "name": "Microsoft.HealthcareApis/services/read", + "isDataAction": false, "display": {}, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/services/write", + "isDataAction": false, "display": {}, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/services/delete", + "isDataAction": false, "display": {}, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/locations/operationresults/read", + "isDataAction": false, "display": { "provider": "Microsoft.HealthcareApis", "resource": "operationresults", @@ -33,11 +37,13 @@ }, { "name": "Microsoft.HealthcareApis/checkNameAvailability/post", + "isDataAction": false, "display": {}, "origin": "user" }, { "name": "Microsoft.HealthcareApis/Operations/read", + "isDataAction": false, "display": { "provider": "Microsoft.HealthcareApis", "resource": "operations", diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/healthcare-apis.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/healthcare-apis.json index 1a83f1c8eedc..8382933ce05f 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/healthcare-apis.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2019-09-16/healthcare-apis.json @@ -428,6 +428,9 @@ "$ref": "#/definitions/OperationResultsDescription" } }, + "202": { + "description": "Accepted - Get request accepted; the operation will complete asynchronously." + }, "404": { "description": "No operation result was found matching operationResultId.", "schema": { @@ -803,6 +806,10 @@ "type": "string", "description": "Operation name: {provider}/{resource}/{read | write | action | delete}" }, + "isDataAction": { + "description": "Gets or sets a value indicating whether the operation is a data action or not", + "type": "boolean" + }, "origin": { "readOnly": true, "type": "string", @@ -811,6 +818,10 @@ "display": { "description": "The information displayed about the operation.", "$ref": "#/definitions/OperationDisplay" + }, + "properties": { + "$ref": "#/definitions/OperationProperties", + "description": "Properties of the operation" } } }, @@ -840,6 +851,11 @@ } } }, + "OperationProperties": { + "description": "Operation properties.", + "type": "object", + "properties": {} + }, "CheckNameAvailabilityParameters": { "description": "Input values.", "type": "object", diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/examples/OperationResultsGet.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/examples/OperationResultsGet.json index fc456dd9cd27..3ff4618bf011 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/examples/OperationResultsGet.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/examples/OperationResultsGet.json @@ -15,6 +15,7 @@ "properties": {} } }, + "202": {}, "404": { "body": { "error": { diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/examples/OperationsList.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/examples/OperationsList.json index fb6ef411d36a..1aeaedb727e8 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/examples/OperationsList.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/examples/OperationsList.json @@ -8,21 +8,25 @@ "value": [ { "name": "Microsoft.HealthcareApis/services/read", + "isDataAction": false, "display": {}, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/services/write", + "isDataAction": false, "display": {}, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/services/delete", + "isDataAction": false, "display": {}, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/locations/operationresults/read", + "isDataAction": false, "display": { "provider": "Microsoft.HealthcareApis", "resource": "operationresults", @@ -33,11 +37,13 @@ }, { "name": "Microsoft.HealthcareApis/checkNameAvailability/post", + "isDataAction": false, "display": {}, "origin": "user" }, { "name": "Microsoft.HealthcareApis/Operations/read", + "isDataAction": false, "display": { "provider": "Microsoft.HealthcareApis", "resource": "operations", diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/healthcare-apis.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/healthcare-apis.json index 8f52e2e545cf..9c68ec5ff838 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/healthcare-apis.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-15/healthcare-apis.json @@ -428,6 +428,9 @@ "$ref": "#/definitions/OperationResultsDescription" } }, + "202": { + "description": "Accepted - Get request accepted; the operation will complete asynchronously." + }, "404": { "description": "No operation result was found matching operationResultId.", "schema": { @@ -808,6 +811,10 @@ "type": "string", "description": "Operation name: {provider}/{resource}/{read | write | action | delete}" }, + "isDataAction": { + "description": "Gets or sets a value indicating whether the operation is a data action or not", + "type": "boolean" + }, "origin": { "readOnly": true, "type": "string", @@ -816,6 +823,10 @@ "display": { "description": "The information displayed about the operation.", "$ref": "#/definitions/OperationDisplay" + }, + "properties": { + "$ref": "#/definitions/OperationProperties", + "description": "Properties of the operation" } } }, @@ -845,6 +856,11 @@ } } }, + "OperationProperties": { + "description": "Operation properties.", + "type": "object", + "properties": {} + }, "CheckNameAvailabilityParameters": { "description": "Input values.", "type": "object", diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/examples/OperationsList.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/examples/OperationsList.json index 847340234e90..c505b8d84a74 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/examples/OperationsList.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/examples/OperationsList.json @@ -9,16 +9,19 @@ { "name": "Microsoft.HealthcareApis/services/read", "display": {}, + "isDataAction": false, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/services/write", "display": {}, + "isDataAction": false, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/services/delete", "display": {}, + "isDataAction": false, "origin": "user,system" }, { @@ -29,11 +32,13 @@ "operation": "read", "description": "Get the status of an asynchronous operation" }, + "isDataAction": false, "origin": "user,system" }, { "name": "Microsoft.HealthcareApis/checkNameAvailability/post", "display": {}, + "isDataAction": false, "origin": "user" }, { @@ -44,6 +49,7 @@ "operation": "read", "description": "Get the list of operations supported by this Resource Provider." }, + "isDataAction": false, "origin": "user,system" } ] diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/examples/ServicePatch.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/examples/ServicePatch.json index 20295986af0a..e9dd92d51149 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/examples/ServicePatch.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/examples/ServicePatch.json @@ -65,6 +65,7 @@ "publicNetworkAccess": "Disabled" } } - } + }, + "202": {} } } diff --git a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/healthcare-apis.json b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/healthcare-apis.json index f5eb4c927f0a..142080c9babe 100644 --- a/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/healthcare-apis.json +++ b/specification/healthcareapis/resource-manager/Microsoft.HealthcareApis/stable/2020-03-30/healthcare-apis.json @@ -178,6 +178,9 @@ "$ref": "#/definitions/ServicesDescription" } }, + "202": { + "description": "Accepted - Patch request accepted; the operation will complete asynchronously." + }, "default": { "description": "DefaultErrorResponse", "schema": { @@ -1115,6 +1118,10 @@ "type": "string", "description": "Operation name: {provider}/{resource}/{read | write | action | delete}" }, + "isDataAction": { + "description": "Gets or sets a value indicating whether the operation is a data action or not", + "type": "boolean" + }, "origin": { "readOnly": true, "type": "string", @@ -1123,6 +1130,10 @@ "display": { "description": "The information displayed about the operation.", "$ref": "#/definitions/OperationDisplay" + }, + "properties": { + "$ref": "#/definitions/OperationProperties", + "description": "Properties of the operation" } } }, @@ -1152,6 +1163,11 @@ } } }, + "OperationProperties": { + "description": "Operation properties.", + "type": "object", + "properties": {} + }, "ServicesPropertiesUpdateParameters": { "description": "The properties for updating a service instance.", "type": "object",