Skip to content

Commit 14313ea

Browse files
authored
Correct swagger spec for error responses. (Azure#12317)
* 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
1 parent 5df8962 commit 14313ea

File tree

4 files changed

+36
-39
lines changed

4 files changed

+36
-39
lines changed

specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/HanaInstances_Create.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
"resourceGroupName": "myResourceGroup",
66
"hanaInstanceName": "myHanaInstance",
77
"hanaInstanceParameter": {
8-
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/hanaInstances/myHanaInstance",
9-
"name": "myHanaInstance",
10-
"type": "Microsoft.HanaOnAzure/hanaInstances",
118
"location": "westus",
129
"tags": {
1310
"key": "value"

specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/examples/SapMonitors_Create.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
"resourceGroupName": "myResourceGroup",
66
"sapMonitorName": "mySapMonitor",
77
"sapMonitorParameter": {
8-
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HanaOnAzure/sapMonitors/mySapMonitor",
9-
"name": "mySapMonitor",
10-
"type": "Microsoft.HanaOnAzure/sapMonitors",
118
"location": "westus",
129
"tags": {
1310
"key": "value"
@@ -19,11 +16,11 @@
1916
"hanaDbSqlPort": 1234,
2017
"hanaDbUsername": "",
2118
"hanaDbPassword": "",
22-
"HanaDbPasswordKeyVaultURL": "",
23-
"HanaDbCredentialsMsiID": "",
19+
"hanaDbPasswordKeyVaultUrl": "",
20+
"hanaDbCredentialsMsiId": "",
2421
"enableCustomerAnalytics": true,
25-
"logAnalyticsWorkspaceArmID": "",
26-
"logAnalyticsWorkspaceID": "",
22+
"logAnalyticsWorkspaceArmId": "",
23+
"logAnalyticsWorkspaceId": "",
2724
"logAnalyticsWorkspaceSharedKey": "",
2825
"provisioningState": "Succeeded"
2926
}

specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2017-11-03-preview/hanaonazure.json

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,6 @@
739739
"description": "Resource location"
740740
},
741741
"tags": {
742-
"readOnly": true,
743742
"type": "object",
744743
"additionalProperties": {
745744
"type": "string"
@@ -799,12 +798,10 @@
799798
"description": "Specifies the network settings for the HANA instance."
800799
},
801800
"hanaInstanceId": {
802-
"readOnly": true,
803801
"type": "string",
804802
"description": "Specifies the HANA instance unique ID."
805803
},
806804
"powerState": {
807-
"readOnly": true,
808805
"type": "string",
809806
"enum": [
810807
"starting",
@@ -821,12 +818,10 @@
821818
"description": "Resource power state"
822819
},
823820
"proximityPlacementGroup": {
824-
"readOnly": true,
825821
"type": "string",
826822
"description": "Resource proximity placement group"
827823
},
828824
"hwRevision": {
829-
"readOnly": true,
830825
"type": "string",
831826
"description": "Hardware revision of a HANA instance"
832827
},
@@ -835,7 +830,6 @@
835830
"description": "ARM ID of another HanaInstance that will share a network with this HanaInstance"
836831
},
837832
"provisioningState": {
838-
"readOnly": true,
839833
"type": "string",
840834
"enum": [
841835
"Accepted",
@@ -858,7 +852,6 @@
858852
"HardwareProfile": {
859853
"properties": {
860854
"hardwareType": {
861-
"readOnly": true,
862855
"type": "string",
863856
"enum": [
864857
"Cisco_UCS",
@@ -871,7 +864,6 @@
871864
"description": "Name of the hardware type (vendor and/or their product name)"
872865
},
873866
"hanaInstanceSize": {
874-
"readOnly": true,
875867
"type": "string",
876868
"enum": [
877869
"S72m",
@@ -950,7 +942,6 @@
950942
"StorageProfile": {
951943
"properties": {
952944
"nfsIpAddress": {
953-
"readOnly": true,
954945
"type": "string",
955946
"description": "IP Address to connect to storage."
956947
},
@@ -971,12 +962,10 @@
971962
"description": "Specifies the host OS name of the HANA instance."
972963
},
973964
"osType": {
974-
"readOnly": true,
975965
"type": "string",
976966
"description": "This property allows you to specify the type of the OS."
977967
},
978968
"version": {
979-
"readOnly": true,
980969
"type": "string",
981970
"description": "Specifies version of operating system."
982971
},
@@ -997,7 +986,6 @@
997986
"description": "Specifies the network interfaces for the HANA instance."
998987
},
999988
"circuitId": {
1000-
"readOnly": true,
1001989
"type": "string",
1002990
"description": "Specifies the circuit id for connecting to express route."
1003991
}
@@ -1073,16 +1061,24 @@
10731061
"description": "Detailed HANA operation information"
10741062
},
10751063
"ErrorResponse": {
1076-
"description": "Describes the format of Error response.",
10771064
"type": "object",
1065+
"description": "Describes the format of Error response.",
10781066
"properties": {
1079-
"code": {
1080-
"description": "Error code",
1081-
"type": "string"
1082-
},
1083-
"message": {
1084-
"description": "Error message indicating why the operation failed.",
1085-
"type": "string"
1067+
"error": {
1068+
"type": "object",
1069+
"description": "Describes the error object.",
1070+
"properties": {
1071+
"code": {
1072+
"readOnly": true,
1073+
"description": "Error code",
1074+
"type": "string"
1075+
},
1076+
"message": {
1077+
"readOnly": true,
1078+
"description": "Error message indicating why the operation failed.",
1079+
"type": "string"
1080+
}
1081+
}
10861082
}
10871083
}
10881084
},
@@ -1199,7 +1195,6 @@
11991195
"description": "Key Vault ID containing customer's HANA credentials."
12001196
},
12011197
"provisioningState": {
1202-
"readOnly": true,
12031198
"type": "string",
12041199
"enum": [
12051200
"Accepted",

specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/preview/2020-02-07-preview/hanaonazure.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -557,16 +557,24 @@
557557
"description": "Detailed HANA operation information"
558558
},
559559
"ErrorResponse": {
560-
"description": "Describes the format of Error response.",
561560
"type": "object",
561+
"description": "Describes the format of Error response.",
562562
"properties": {
563-
"code": {
564-
"description": "Error code",
565-
"type": "string"
566-
},
567-
"message": {
568-
"description": "Error message indicating why the operation failed.",
569-
"type": "string"
563+
"error": {
564+
"type": "object",
565+
"description": "Describes the error object.",
566+
"properties": {
567+
"code": {
568+
"readOnly": true,
569+
"description": "Error code",
570+
"type": "string"
571+
},
572+
"message": {
573+
"readOnly": true,
574+
"description": "Error message indicating why the operation failed.",
575+
"type": "string"
576+
}
577+
}
570578
}
571579
}
572580
},

0 commit comments

Comments
 (0)