-
Notifications
You must be signed in to change notification settings - Fork 21
/
swagger.yml
88 lines (88 loc) · 2.11 KB
/
swagger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
swagger: '2.0'
info:
version: 1.0.0
title: WP Unit Test API.
description: |
#### An API to collect unit test results.
schemes:
- https
basePath: /wp-json/wp-unit-test-api/v1
host: wpunittestapi.wpengine.com
paths:
/results:
post:
description: Creates a new results post.
operationId: addResults
parameters:
- name: results
in: body
description: Results to submit.
required: true
schema:
$ref: '#/definitions/newResult'
responses:
200:
description: Results created.
schema:
$ref: '#/definitions/Response'
400:
description: An object describing the error.
schema:
$ref: '#/definitions/Error'
401:
description: The request was unauthorized.
schema:
$ref: '#/definitions/Error'
produces:
- application/json
definitions:
newResult:
type: object
required:
- commit
- results
properties:
commit:
description: The commit revision.
type: string
results:
description: The phpunit results in JSON format.
type: string
meta:
description: Metadata about the environment (in JSON);
type: string
Response:
type: object
properties:
success:
type: boolean
Error:
type: object
required:
- message
- code
properties:
message:
type: string
description: A message regarding the error that occurred on the server.
code:
type: string
description: A human readable code such as 'cannot_be_empty' relating to the error that occurred with the field and resource.
data:
type: array
description: An array containing additional information about the error.
items:
- $ref: '#/definitions/ErrorData'
ErrorData:
type: object
required:
- key
- value
properties:
key:
type: string
description: The key for the data.
value:
type: string
description: The data.