Skip to content

Commit d6bb89e

Browse files
committed
test(dredd): change endpoint spec
1 parent 401d546 commit d6bb89e

File tree

2 files changed

+14
-21
lines changed

2 files changed

+14
-21
lines changed

.dredd/hooks/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ func main() {
123123
addCapabilities([]string{"repository", "inventory", "environment", "view"})
124124
})
125125

126+
h.Before("template > /api/project/{project_id}/templates/{template_id}/stop_all_tasks > Stop all active tasks of template > 204 > application/json", capabilityWrapper("template"))
126127
h.Before("template > /api/project/{project_id}/templates/{template_id} > Get template > 200 > application/json", capabilityWrapper("template"))
127128
h.Before("template > /api/project/{project_id}/templates/{template_id} > Updates template > 204 > application/json", capabilityWrapper("template"))
128129
h.Before("template > /api/project/{project_id}/templates/{template_id} > Removes template > 204 > application/json", capabilityWrapper("template"))
129-
h.Before("template > /api/project/{project_id}/templates/{template_id}/stop_all_tasks > Stop all active tasks of template > 204 > application/json", capabilityWrapper("template"))
130130

131131
h.Before("task > /api/project/{project_id}/tasks > Starts a job > 201 > application/json", capabilityWrapper("template"))
132132
h.Before("task > /api/project/{project_id}/tasks/last > Get last 200 Tasks related to current project > 200 > application/json", capabilityWrapper("template"))

api-docs.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2403,6 +2403,19 @@ paths:
24032403
description: template created
24042404
schema:
24052405
$ref: "#/definitions/Template"
2406+
2407+
/project/{project_id}/templates/{template_id}/stop_all_tasks:
2408+
parameters:
2409+
- $ref: "#/parameters/project_id"
2410+
- $ref: "#/parameters/template_id"
2411+
post:
2412+
tags:
2413+
- template
2414+
summary: Stop all active tasks of template
2415+
responses:
2416+
204:
2417+
description: tasks stopped
2418+
24062419
/project/{project_id}/templates/{template_id}:
24072420
parameters:
24082421
- $ref: "#/parameters/project_id"
@@ -2437,26 +2450,6 @@ paths:
24372450
204:
24382451
description: template removed
24392452

2440-
/project/{project_id}/templates/{template_id}/stop_all_tasks:
2441-
parameters:
2442-
- $ref: "#/parameters/project_id"
2443-
- $ref: "#/parameters/template_id"
2444-
post:
2445-
tags:
2446-
- template
2447-
summary: Stop all active tasks of template
2448-
responses:
2449-
201:
2450-
description: tasks stopped
2451-
delete:
2452-
tags:
2453-
- template
2454-
summary: Removes template
2455-
responses:
2456-
204:
2457-
description: template removed
2458-
2459-
24602453
# project schedules
24612454
/project/{project_id}/schedules/{schedule_id}:
24622455
parameters:

0 commit comments

Comments
 (0)