Skip to content

Commit b634944

Browse files
authored
Fix AAS Swagger Correctness v5 (#12821)
* fix correctness * fix * fix prettier * add default value * no message * fix nit * use error object * Remove default
1 parent f10a7a1 commit b634944

File tree

2 files changed

+83
-71
lines changed

2 files changed

+83
-71
lines changed

specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2016-05-16/analysisservices.json

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,9 +1153,8 @@
11531153
"description": "The status of the operation."
11541154
},
11551155
"error": {
1156-
"type": "object",
11571156
"description": "The error detail of the operation if any.",
1158-
"$ref": "#/definitions/ErrorResponse"
1157+
"$ref": "#/definitions/ErrorObject"
11591158
}
11601159
}
11611160
},
@@ -1260,46 +1259,50 @@
12601259
},
12611260
"description": "The resource management error additional info."
12621261
},
1262+
"ErrorObject": {
1263+
"type": "object",
1264+
"description": "The error object",
1265+
"properties": {
1266+
"code": {
1267+
"description": "Error code",
1268+
"type": "string"
1269+
},
1270+
"message": {
1271+
"description": "Error message indicating why the operation failed.",
1272+
"type": "string"
1273+
},
1274+
"subCode": {
1275+
"description": "The error sub code",
1276+
"type": "integer",
1277+
"format": "int32"
1278+
},
1279+
"httpStatusCode": {
1280+
"description": "The http status code",
1281+
"type": "integer",
1282+
"format": "int32"
1283+
},
1284+
"timeStamp": {
1285+
"description": "the timestamp for the error.",
1286+
"type": "string",
1287+
"readOnly": true
1288+
},
1289+
"details": {
1290+
"readOnly": true,
1291+
"type": "array",
1292+
"items": {
1293+
"$ref": "#/definitions/ErrorDetail"
1294+
},
1295+
"description": "The error details."
1296+
}
1297+
}
1298+
},
12631299
"ErrorResponse": {
12641300
"description": "Describes the format of Error response.",
12651301
"type": "object",
12661302
"properties": {
12671303
"error": {
1268-
"type": "object",
12691304
"description": "The error object",
1270-
"properties": {
1271-
"code": {
1272-
"description": "Error code",
1273-
"type": "string"
1274-
},
1275-
"message": {
1276-
"description": "Error message indicating why the operation failed.",
1277-
"type": "string"
1278-
},
1279-
"subCode": {
1280-
"description": "The error sub code",
1281-
"type": "integer",
1282-
"format": "int32"
1283-
},
1284-
"httpStatusCode": {
1285-
"description": "The http status code",
1286-
"type": "integer",
1287-
"format": "int32"
1288-
},
1289-
"timeStamp": {
1290-
"description": "the timestamp for the error.",
1291-
"type": "string",
1292-
"readOnly": true
1293-
},
1294-
"details": {
1295-
"readOnly": true,
1296-
"type": "array",
1297-
"items": {
1298-
"$ref": "#/definitions/ErrorDetail"
1299-
},
1300-
"description": "The error details."
1301-
}
1302-
}
1305+
"$ref": "#/definitions/ErrorObject"
13031306
}
13041307
}
13051308
}

specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2017-08-01/analysisservices.json

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,11 @@
13601360
"description": "The http status code",
13611361
"type": "integer",
13621362
"format": "int32"
1363+
},
1364+
"timeStamp": {
1365+
"description": "the timestamp for the error.",
1366+
"type": "string",
1367+
"readOnly": true
13631368
}
13641369
}
13651370
},
@@ -1426,7 +1431,7 @@
14261431
"error": {
14271432
"type": "object",
14281433
"description": "The error detail of the operation if any.",
1429-
"$ref": "#/definitions/ErrorResponse"
1434+
"$ref": "#/definitions/ErrorObject"
14301435
}
14311436
}
14321437
},
@@ -1521,46 +1526,50 @@
15211526
},
15221527
"description": "The resource management error additional info."
15231528
},
1529+
"ErrorObject": {
1530+
"type": "object",
1531+
"description": "The error object",
1532+
"properties": {
1533+
"code": {
1534+
"description": "Error code",
1535+
"type": "string"
1536+
},
1537+
"message": {
1538+
"description": "Error message indicating why the operation failed.",
1539+
"type": "string"
1540+
},
1541+
"subCode": {
1542+
"description": "The error sub code",
1543+
"type": "integer",
1544+
"format": "int32"
1545+
},
1546+
"httpStatusCode": {
1547+
"description": "The http status code",
1548+
"type": "integer",
1549+
"format": "int32"
1550+
},
1551+
"timeStamp": {
1552+
"description": "the timestamp for the error.",
1553+
"type": "string",
1554+
"readOnly": true
1555+
},
1556+
"details": {
1557+
"readOnly": true,
1558+
"type": "array",
1559+
"items": {
1560+
"$ref": "#/definitions/ErrorDetail"
1561+
},
1562+
"description": "The error details."
1563+
}
1564+
}
1565+
},
15241566
"ErrorResponse": {
15251567
"description": "Describes the format of Error response.",
15261568
"type": "object",
15271569
"properties": {
15281570
"error": {
1529-
"type": "object",
15301571
"description": "The error object",
1531-
"properties": {
1532-
"code": {
1533-
"description": "Error code",
1534-
"type": "string"
1535-
},
1536-
"message": {
1537-
"description": "Error message indicating why the operation failed.",
1538-
"type": "string"
1539-
},
1540-
"subCode": {
1541-
"description": "The error sub code",
1542-
"type": "integer",
1543-
"format": "int32"
1544-
},
1545-
"httpStatusCode": {
1546-
"description": "The http status code",
1547-
"type": "integer",
1548-
"format": "int32"
1549-
},
1550-
"timeStamp": {
1551-
"description": "the timestamp for the error.",
1552-
"type": "string",
1553-
"readOnly": true
1554-
},
1555-
"details": {
1556-
"readOnly": true,
1557-
"type": "array",
1558-
"items": {
1559-
"$ref": "#/definitions/ErrorDetail"
1560-
},
1561-
"description": "The error details."
1562-
}
1563-
}
1572+
"$ref": "#/definitions/ErrorObject"
15641573
}
15651574
}
15661575
}

0 commit comments

Comments
 (0)