Commit c3f3885a authored by Nick Thomas's avatar Nick Thomas

Merge branch 'add-normalized-target-url-to-dast-site-validtion' into 'master'

Expose normalizedTargetUrl on DastSiteValidation

See merge request gitlab-org/gitlab!49541
parents f1e31c75 72fb5dce
......@@ -5442,6 +5442,11 @@ type DastSiteValidation {
"""
id: DastSiteValidationID!
"""
Normalized URL of the target to be validated
"""
normalizedTargetUrl: String
"""
Status of the site validation
"""
......
......@@ -14977,6 +14977,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "normalizedTargetUrl",
"description": "Normalized URL of the target to be validated",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "status",
"description": "Status of the site validation",
......@@ -939,6 +939,7 @@ Represents a DAST Site Validation.
| Field | Type | Description |
| ----- | ---- | ----------- |
| `id` | DastSiteValidationID! | Global ID of the site validation |
| `normalizedTargetUrl` | String | Normalized URL of the target to be validated |
| `status` | DastSiteProfileValidationStatusEnum! | Status of the site validation |
### DastSiteValidationCreatePayload
......
......@@ -13,5 +13,12 @@ module Types
field :status, Types::DastSiteProfileValidationStatusEnum, null: false,
description: 'Status of the site validation',
method: :state
field :normalized_target_url, GraphQL::STRING_TYPE, null: true,
description: 'Normalized URL of the target to be validated'
def normalized_target_url
object.url_base
end
end
end
......@@ -6,7 +6,7 @@ RSpec.describe GitlabSchema.types['DastSiteValidation'] do
let_it_be(:dast_site_validation) { create(:dast_site_validation) }
let_it_be(:project) { dast_site_validation.dast_site_token.project }
let_it_be(:user) { create(:user) }
let_it_be(:fields) { %i[id status] }
let_it_be(:fields) { %i[id status normalizedTargetUrl] }
let(:response) do
GitlabSchema.execute(
......@@ -42,6 +42,7 @@ RSpec.describe GitlabSchema.types['DastSiteValidation'] do
dastSiteValidation(targetUrl: $targetUrl) {
id
status
normalizedTargetUrl
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment