Skip to content

Commit

Permalink
Fix swagger correctness errors (Azure#12246)
Browse files Browse the repository at this point in the history
* Fix swagger correctness issues in Security for Iot service

* changed int format from 32 to 64

* Add systemData to iotSecuritySolutions

Co-authored-by: Liran Chen <lirche@microsoft.com>
  • Loading branch information
2 people authored and josuh committed Jan 6, 2021
1 parent 36af14d commit 815f1e3
Show file tree
Hide file tree
Showing 18 changed files with 509 additions and 183 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"responses": {
"200": {
"body": {
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.Security/iotAlerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"name": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"type": "Microsoft.Security/iotAlerts",
"properties": {
"systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"compromisedEntity": "device-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"body": {
"value": [
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.Security/iotAlerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"name": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"type": "Microsoft.Security/iotAlerts",
"properties": {
"systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"compromisedEntity": "device-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@
"description": "Alert properties",
"$ref": "#/definitions/IotAlertPropertiesModel"
}
}
},
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/Resource"
}
]
},
"IotAlertPropertiesModel": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,16 @@
],
"properties": {}
},
"ConnectionFromIpNotAllowed": {
"type": "object",
"description": "Inbound connection from an ip that isn't allowed. Allow list consists of ipv4 or ipv6 range in CIDR notation.",
"allOf": [
{
"$ref": "#/definitions/AllowlistCustomAlertRule"
}
],
"properties": {}
},
"LocalUserNotAllowed": {
"type": "object",
"description": "Login by a local user that isn't allowed. Allow list consists of login names to allow.",
Expand Down Expand Up @@ -416,10 +426,12 @@
"properties": {
"minThreshold": {
"type": "integer",
"format": "int32",
"description": "The minimum threshold."
},
"maxThreshold": {
"type": "integer",
"format": "int32",
"description": "The maximum threshold."
}
},
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@
}
],
"unmaskedIpLoggingStatus": "Enabled"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
},
Expand Down Expand Up @@ -258,6 +266,14 @@
}
],
"unmaskedIpLoggingStatus": "Enabled"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@
}
],
"unmaskedIpLoggingStatus": "Enabled"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@
}
],
"unmaskedIpLoggingStatus": "Enabled"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
},
{
Expand Down Expand Up @@ -227,6 +235,14 @@
}
],
"unmaskedIpLoggingStatus": "Enabled"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@
}
],
"unmaskedIpLoggingStatus": "Enabled"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@
}
],
"unmaskedIpLoggingStatus": "Enabled"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@
}
],
"unmaskedIpLoggingStatus": "Enabled"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@
}
],
"unmaskedIpLoggingStatus": "Enabled"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2020-04-27T21:53:29.0928001Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2020-04-27T21:53:29.0928001Z"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"responses": {
"200": {
"body": {
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.Security/iotAlerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"name": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"type": "Microsoft.Security/iotAlerts",
"properties": {
"systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"compromisedEntity": "device-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"body": {
"value": [
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/MyGroup/providers/Microsoft.Devices/iotHubs/myIotHub/providers/Microsoft.Security/iotAlerts/903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"name": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"type": "Microsoft.Security/iotAlerts",
"properties": {
"systemAlertId": "903e76ff-17eb-4bac-ac8a-2bc31ab68fd8",
"compromisedEntity": "device-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,12 @@
"description": "Alert properties",
"$ref": "#/definitions/IotAlertProperties"
}
}
},
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/Resource"
}
]
},
"IotAlertProperties": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
"in": "query",
"description": "Number of results to retrieve.",
"required": false,
"type": "integer"
"type": "integer",
"format": "int32"
}
],
"responses": {
Expand Down Expand Up @@ -332,7 +333,8 @@
"in": "query",
"description": "Number of results to retrieve.",
"required": false,
"type": "integer"
"type": "integer",
"format": "int32"
}
],
"responses": {
Expand Down Expand Up @@ -362,14 +364,17 @@
"properties": {
"high": {
"type": "integer",
"format": "int64",
"description": "Count of high severity alerts/recommendations."
},
"medium": {
"type": "integer",
"format": "int64",
"description": "Count of medium severity alerts/recommendations."
},
"low": {
"type": "integer",
"format": "int64",
"description": "Count of low severity alerts/recommendations."
}
}
Expand Down Expand Up @@ -401,6 +406,7 @@
},
"unhealthyDeviceCount": {
"type": "integer",
"format": "int64",
"readOnly": true,
"description": "Number of unhealthy devices within your IoT Security solution."
},
Expand Down Expand Up @@ -607,6 +613,7 @@
"count": {
"readOnly": true,
"type": "integer",
"format": "int64",
"description": "Number of alerts occurrences within the aggregated time window."
},
"effectedResourceType": {
Expand Down Expand Up @@ -643,6 +650,7 @@
"alertsCount": {
"readOnly": true,
"type": "integer",
"format": "int64",
"description": "Number of alerts raised for this device."
},
"lastOccurrence": {
Expand Down Expand Up @@ -739,11 +747,13 @@
"healthyDevices": {
"readOnly": true,
"type": "integer",
"format": "int64",
"description": "Number of healthy devices within the IoT Security solution."
},
"unhealthyDeviceCount": {
"readOnly": true,
"type": "integer",
"format": "int64",
"description": "Number of unhealthy devices within the IoT Security solution."
},
"logAnalyticsQuery": {
Expand All @@ -765,6 +775,7 @@
"alertsCount": {
"readOnly": true,
"type": "integer",
"format": "int64",
"description": "Number of alerts raised for this device."
}
}
Expand Down Expand Up @@ -810,6 +821,7 @@
"alertsCount": {
"readOnly": true,
"type": "integer",
"format": "int64",
"description": "Number of alerts raised for this alert type."
}
}
Expand Down Expand Up @@ -855,6 +867,7 @@
"devicesCount": {
"readOnly": true,
"type": "integer",
"format": "int64",
"description": "Number of devices with this recommendation."
}
}
Expand Down
Loading

0 comments on commit 815f1e3

Please sign in to comment.