Skip to content

Commit

Permalink
update sql vulnerability assessment swagger according to SQL controll…
Browse files Browse the repository at this point in the history
…er requirements. (Azure#19240)

Co-authored-by: Ahmad Abas <ahabas@microsoft.com>
  • Loading branch information
2 people authored and ericshape committed May 31, 2022
1 parent f1bfe83 commit fe49490
Show file tree
Hide file tree
Showing 10 changed files with 365 additions and 399 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"200": {
"description": "Successfully got the sql vulnerability assessment rule baseline list.",
"schema": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult"
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSetListResult"
}
},
"default": {
Expand Down Expand Up @@ -130,16 +130,13 @@
"200": {
"description": "Successfully got the sql vulnerability assessment rule baseline list.",
"schema": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult"
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Gets a list of database's sql vulnerability assessment rule baselines.": {
"$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json"
Expand Down Expand Up @@ -209,16 +206,13 @@
"200": {
"description": "Successfully add the vulnerability assessment rule baseline list.",
"schema": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult"
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Add a database's vulnerability assessment rule baseline list.": {
"$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json"
Expand All @@ -231,8 +225,8 @@
}
},
"definitions": {
"DatabaseSqlVulnerabilityAssessmentRuleBaseline": {
"description": "A database sql vulnerability assessment rule baseline.",
"DatabaseSqlVulnerabilityAssessmentBaselineSet": {
"description": "A database sql vulnerability assessment baseline set.",
"type": "object",
"allOf": [
{
Expand All @@ -242,16 +236,57 @@
"properties": {
"systemData": {
"$ref": "../../../common/v1/types.json#/definitions/systemData",
"description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.",
"description": "SystemData of DatabaseSqlVulnerabilityAssessmentBaselineSetResource.",
"readOnly": true
},
"properties": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties",
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSetProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
}
},
"DatabaseSqlVulnerabilityAssessmentBaselineSetListResult": {
"description": "A list of SQL Vulnerability Assessments baseline set.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"DatabaseSqlVulnerabilityAssessmentBaselineSetProperties": {
"description": "Properties of a database Sql Vulnerability Assessment baseline set.",
"required": [
"results"
],
"type": "object",
"properties": {
"results": {
"description": "The baseline set result",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": {
"description": "A database sql vulnerability assessment rule baseline list input.",
"type": "object",
Expand Down Expand Up @@ -299,44 +334,6 @@
}
}
}
},
"DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": {
"description": "A list of SQL Vulnerability Assessments rule baseline.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": {
"description": "Properties of a database Sql Vulnerability Assessment rule baseline.",
"required": [
"results"
],
"type": "object",
"properties": {
"results": {
"description": "The rule baseline result",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"200": {
"description": "Successfully got the sql vulnerability assessment rule baseline list.",
"schema": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult"
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSetListResult"
}
},
"default": {
Expand Down Expand Up @@ -152,16 +152,13 @@
"200": {
"description": "Successfully got the sql vulnerability assessment rule baseline list.",
"schema": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult"
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Gets a list of database's sql vulnerability assessment rule baselines.": {
"$ref": "./examples/SqlVulnerabilityAssessmentBaselineGet.json"
Expand Down Expand Up @@ -242,16 +239,13 @@
"200": {
"description": "Successfully add the vulnerability assessment rule baseline list.",
"schema": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult"
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"Add a database's vulnerability assessment rule baseline list.": {
"$ref": "./examples/SqlVulnerabilityAssessmentBaselineAdd.json"
Expand All @@ -264,8 +258,8 @@
}
},
"definitions": {
"DatabaseSqlVulnerabilityAssessmentRuleBaseline": {
"description": "A database sql vulnerability assessment rule baseline.",
"DatabaseSqlVulnerabilityAssessmentBaselineSet": {
"description": "A database sql vulnerability assessment baseline set.",
"type": "object",
"allOf": [
{
Expand All @@ -275,16 +269,57 @@
"properties": {
"systemData": {
"$ref": "../../../common/v1/types.json#/definitions/systemData",
"description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.",
"description": "SystemData of DatabaseSqlVulnerabilityAssessmentBaselineSetResource.",
"readOnly": true
},
"properties": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties",
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSetProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
}
},
"DatabaseSqlVulnerabilityAssessmentBaselineSetListResult": {
"description": "A list of SQL Vulnerability Assessments baseline set.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentBaselineSet"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"DatabaseSqlVulnerabilityAssessmentBaselineSetProperties": {
"description": "Properties of a database Sql Vulnerability Assessment baseline set.",
"required": [
"results"
],
"type": "object",
"properties": {
"results": {
"description": "The baseline set result",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": {
"description": "A database sql vulnerability assessment rule baseline list input.",
"type": "object",
Expand Down Expand Up @@ -332,44 +367,6 @@
}
}
}
},
"DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": {
"description": "A list of SQL Vulnerability Assessments rule baseline.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": {
"description": "Properties of a database Sql Vulnerability Assessment rule baseline.",
"required": [
"results"
],
"type": "object",
"properties": {
"results": {
"description": "The rule baseline result",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"parameters": {
Expand Down
Loading

0 comments on commit fe49490

Please sign in to comment.