Skip to content

Commit

Permalink
Correct swagger spec for error responses. (Azure#12317)
Browse files Browse the repository at this point in the history
* Correct swagger spec for error responses.

* Fix example file for SAP monitor create to use
the correct casing.

* Remove read-only setting from
most of HanaInstance properties.

* Fix remaining model validation failures.

* One more property to fix

* Resource object should have read-only
properties. Must fix the example code.

* Remove read-only properties from example file

* Fix error from prettier
  • Loading branch information
rkrishna12 authored Jan 15, 2021
1 parent 5df8962 commit 14313ea
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"resourceGroupName": "myResourceGroup",
"hanaInstanceName": "myHanaInstance",
"hanaInstanceParameter": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/hanaInstances/myHanaInstance",
"name": "myHanaInstance",
"type": "Microsoft.HanaOnAzure/hanaInstances",
"location": "westus",
"tags": {
"key": "value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"resourceGroupName": "myResourceGroup",
"sapMonitorName": "mySapMonitor",
"sapMonitorParameter": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor",
"name": "mySapMonitor",
"type": "Microsoft.HanaOnAzure/sapMonitors",
"location": "westus",
"tags": {
"key": "value"
Expand All @@ -19,11 +16,11 @@
"hanaDbSqlPort": 1234,
"hanaDbUsername": "",
"hanaDbPassword": "",
"HanaDbPasswordKeyVaultURL": "",
"HanaDbCredentialsMsiID": "",
"hanaDbPasswordKeyVaultUrl": "",
"hanaDbCredentialsMsiId": "",
"enableCustomerAnalytics": true,
"logAnalyticsWorkspaceArmID": "",
"logAnalyticsWorkspaceID": "",
"logAnalyticsWorkspaceArmId": "",
"logAnalyticsWorkspaceId": "",
"logAnalyticsWorkspaceSharedKey": "",
"provisioningState": "Succeeded"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,6 @@
"description": "Resource location"
},
"tags": {
"readOnly": true,
"type": "object",
"additionalProperties": {
"type": "string"
Expand Down Expand Up @@ -799,12 +798,10 @@
"description": "Specifies the network settings for the HANA instance."
},
"hanaInstanceId": {
"readOnly": true,
"type": "string",
"description": "Specifies the HANA instance unique ID."
},
"powerState": {
"readOnly": true,
"type": "string",
"enum": [
"starting",
Expand All @@ -821,12 +818,10 @@
"description": "Resource power state"
},
"proximityPlacementGroup": {
"readOnly": true,
"type": "string",
"description": "Resource proximity placement group"
},
"hwRevision": {
"readOnly": true,
"type": "string",
"description": "Hardware revision of a HANA instance"
},
Expand All @@ -835,7 +830,6 @@
"description": "ARM ID of another HanaInstance that will share a network with this HanaInstance"
},
"provisioningState": {
"readOnly": true,
"type": "string",
"enum": [
"Accepted",
Expand All @@ -858,7 +852,6 @@
"HardwareProfile": {
"properties": {
"hardwareType": {
"readOnly": true,
"type": "string",
"enum": [
"Cisco_UCS",
Expand All @@ -871,7 +864,6 @@
"description": "Name of the hardware type (vendor and/or their product name)"
},
"hanaInstanceSize": {
"readOnly": true,
"type": "string",
"enum": [
"S72m",
Expand Down Expand Up @@ -950,7 +942,6 @@
"StorageProfile": {
"properties": {
"nfsIpAddress": {
"readOnly": true,
"type": "string",
"description": "IP Address to connect to storage."
},
Expand All @@ -971,12 +962,10 @@
"description": "Specifies the host OS name of the HANA instance."
},
"osType": {
"readOnly": true,
"type": "string",
"description": "This property allows you to specify the type of the OS."
},
"version": {
"readOnly": true,
"type": "string",
"description": "Specifies version of operating system."
},
Expand All @@ -997,7 +986,6 @@
"description": "Specifies the network interfaces for the HANA instance."
},
"circuitId": {
"readOnly": true,
"type": "string",
"description": "Specifies the circuit id for connecting to express route."
}
Expand Down Expand Up @@ -1073,16 +1061,24 @@
"description": "Detailed HANA operation information"
},
"ErrorResponse": {
"description": "Describes the format of Error response.",
"type": "object",
"description": "Describes the format of Error response.",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
"error": {
"type": "object",
"description": "Describes the error object.",
"properties": {
"code": {
"readOnly": true,
"description": "Error code",
"type": "string"
},
"message": {
"readOnly": true,
"description": "Error message indicating why the operation failed.",
"type": "string"
}
}
}
}
},
Expand Down Expand Up @@ -1199,7 +1195,6 @@
"description": "Key Vault ID containing customer's HANA credentials."
},
"provisioningState": {
"readOnly": true,
"type": "string",
"enum": [
"Accepted",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,16 +557,24 @@
"description": "Detailed HANA operation information"
},
"ErrorResponse": {
"description": "Describes the format of Error response.",
"type": "object",
"description": "Describes the format of Error response.",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
"error": {
"type": "object",
"description": "Describes the error object.",
"properties": {
"code": {
"readOnly": true,
"description": "Error code",
"type": "string"
},
"message": {
"readOnly": true,
"description": "Error message indicating why the operation failed.",
"type": "string"
}
}
}
}
},
Expand Down

0 comments on commit 14313ea

Please sign in to comment.