Skip to content

Commit bbb2a5c

Browse files
authored
Merge pull request #4708 from cloud-gov/fix-specific-report-docs
add url to site build task response
2 parents e5d0d35 + d859b37 commit bbb2a5c

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

api/controllers/site.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ module.exports = wrapHandlers({
196196
branch: sbt.branch,
197197
name: sbt.BuildTaskType.name,
198198
description: sbt.BuildTaskType.description,
199+
url: sbt.BuildTaskType.url,
199200
}));
200201

201202
return res.json(siteBuildTasks);

public/swagger/SiteBuildTask.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"type": "object",
3+
"required": ["id", "name", "description", "startsWhen", "url"],
4+
"properties": {
5+
"id": {
6+
"type": "string",
7+
"enum": ["a11y", "owasp-zap"]
8+
},
9+
"sbtId": {
10+
"type": "integer"
11+
},
12+
"name": {
13+
"type": "string"
14+
},
15+
"description": {
16+
"type": "string"
17+
},
18+
"metadata": {
19+
"type": "object",
20+
"properties": {
21+
"rules": {
22+
"type": "array"
23+
},
24+
"runDay": {
25+
"type": "integer"
26+
}
27+
}
28+
},
29+
"url": {
30+
"type": "string"
31+
},
32+
"branch": {
33+
"type": "string"
34+
}
35+
}
36+
}

public/swagger/index.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,26 @@ paths:
12461246
description: The site of the user environment variable is to be added to cannot be found
12471247
schema:
12481248
$ref: 'Error.json'
1249+
/site/{site_id}/task:
1250+
parameters:
1251+
- name: site_id
1252+
in: path
1253+
description: The id of the site
1254+
type: integer
1255+
required: true
1256+
get:
1257+
summary: Fetch the list of registered build task types for the given site
1258+
responses:
1259+
200:
1260+
description: A list of registered build task types for the given site
1261+
schema:
1262+
type: array
1263+
items:
1264+
$ref: 'SiteBuildTask.json'
1265+
404:
1266+
description: Not found
1267+
schema:
1268+
$ref: 'Error.json'
12491269
/site/{site_id}/tasks:
12501270
parameters:
12511271
- name: site_id

0 commit comments

Comments
 (0)