UNPKG

2.02 kBJSONView Raw
1{
2 "title": "Subrequests format",
3 "description": "Describes the subrequests payload format.",
4 "type": "array",
5 "items": {
6 "$ref": "#/definitions/subrequest"
7 },
8 "definitions": {
9 "subrequest": {
10 "title": "Subrequest",
11 "description": "Contains all the necessary information to make the request.",
12 "type": "object",
13 "required": [
14 "action",
15 "uri"
16 ],
17 "additionalProperties": false,
18 "properties": {
19 "action": {
20 "title": "Action",
21 "description": "The action intended for the request. Each action can resolve into a different HTTP method.",
22 "type": "string",
23 "enum": [
24 "view",
25 "create",
26 "update",
27 "replace",
28 "delete",
29 "exists",
30 "discover",
31 "noop"
32 ]
33 },
34 "uri": {
35 "title": "URI",
36 "description": "The URI where to make the subrequest.",
37 "type": "string"
38 },
39 "requestId": {
40 "title": "Request ID",
41 "description": "ID other requests can use to reference this request.",
42 "type": "string"
43 },
44 "body": {
45 "title": "Body",
46 "description": "The JSON encoded body payload for HTTP requests send a body.",
47 "type": "string"
48 },
49 "headers": {
50 "title": "Headers",
51 "description": "HTTP headers to be sent with the request.",
52 "type": "object",
53 "additionalProperties": true,
54 "patternProperties": {
55 ".*": {
56 "type": "string"
57 }
58 }
59 },
60 "waitFor": {
61 "title": "Parent ID",
62 "description": "ID of other requests that this request depends on.",
63 "type": "array",
64 "items": {
65 "type": "string",
66 "description": "ID of another request that is a dependency for this one."
67 }
68 }
69 }
70 }
71 }
72}