Skip to content

Commit

Permalink
Merge pull request #4708 from cloud-gov/fix-specific-report-docs
Browse files Browse the repository at this point in the history
add url to site build task response
  • Loading branch information
drewbo authored Jan 27, 2025
2 parents e5d0d35 + d859b37 commit bbb2a5c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/controllers/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ module.exports = wrapHandlers({
branch: sbt.branch,
name: sbt.BuildTaskType.name,
description: sbt.BuildTaskType.description,
url: sbt.BuildTaskType.url,
}));

return res.json(siteBuildTasks);
Expand Down
36 changes: 36 additions & 0 deletions public/swagger/SiteBuildTask.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"type": "object",
"required": ["id", "name", "description", "startsWhen", "url"],
"properties": {
"id": {
"type": "string",
"enum": ["a11y", "owasp-zap"]
},
"sbtId": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"rules": {
"type": "array"
},
"runDay": {
"type": "integer"
}
}
},
"url": {
"type": "string"
},
"branch": {
"type": "string"
}
}
}
20 changes: 20 additions & 0 deletions public/swagger/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,26 @@ paths:
description: The site of the user environment variable is to be added to cannot be found
schema:
$ref: 'Error.json'
/site/{site_id}/task:
parameters:
- name: site_id
in: path
description: The id of the site
type: integer
required: true
get:
summary: Fetch the list of registered build task types for the given site
responses:
200:
description: A list of registered build task types for the given site
schema:
type: array
items:
$ref: 'SiteBuildTask.json'
404:
description: Not found
schema:
$ref: 'Error.json'
/site/{site_id}/tasks:
parameters:
- name: site_id
Expand Down

0 comments on commit bbb2a5c

Please sign in to comment.