Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add On Premise Sql Resource Details #10041

Merged
31 changes: 30 additions & 1 deletion specification/security/resource-manager/common/v1/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@
"description": "The platform where the assessed resource resides",
"enum": [
"Azure",
"OnPremise"
"OnPremise",
"OnPremiseSql"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OnPremiseSql [](start = 13, length = 12)

The PR appears to be modifying some definitions shared across security swaggers. Which API versions will this affect?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft.Security/subassessments 2019-01-01-preview and 2020-01-01

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your change would effectively alter the behavior of 2 API versions. As per https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md, this is not allowed. You should bump the API version and only allow the new enum values in that API version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My change doesn’t affect the API behavior – I didn’t change any of the current fields (not rename any field and not removed any field) I only added a new option for a new value that field can get, this field already exists.

],
"x-ms-enum": {
"name": "source",
Expand All @@ -182,6 +183,10 @@
{
"value": "OnPremise",
"description": "Resource in an on premise machine connected to Azure cloud"
},
{
"value": "OnPremiseSql",
"description": "SQL Resource in an on premise machine connected to Azure cloud"
}
]
}
Expand Down Expand Up @@ -242,6 +247,30 @@
"machineName"
]
},
"OnPremiseSqlResourceDetails": {
"type": "object",
"description": "Details of the On Premise Sql resource that was assessed",
"x-ms-discriminator-value": "OnPremiseSql",
"allOf": [
{
"$ref": "#/definitions/OnPremiseResourceDetails"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure this inherits correctly, and doesn't just defaults to base type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
],
"properties": {
"serverName": {
"type": "string",
"description": "The Sql server name installed on the machine"
},
"databaseName": {
"type": "string",
"description": "The Sql database name installed on the machine"
}
},
"required": [
"serverName",
"databaseName"
]
},
"AzureResourceLinks": {
"description": "array of azure resource IDs",
"readOnly": true,
Expand Down