summaryrefslogtreecommitdiffstats
path: root/schema.json
blob: a9b9b919a7f757924f1512233faa14b104e90a25 (plain)
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
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Subrequests format",
  "description": "Describes the subrequests payload format.",
  "type": "array",
  "items": {
    "$ref": "#/definitions/subrequest"
  },
  "definitions": {
    "subrequest": {
      "title": "Subrequest",
      "description": "Contains all the necessary information to make the request.",
      "type": "object",
      "required": [
        "action",
        "uri"
      ],
      "additionalProperties": false,
      "properties": {
        "action": {
          "title": "Action",
          "description": "The action intended for the request. Each action can resolve into a different HTTP method.",
          "type": "string",
          "enum": [
            "view",
            "create",
            "update",
            "replace",
            "delete",
            "exists",
            "discover",
            "noop"
          ]
        },
        "uri": {
          "title": "URI",
          "description": "The URI where to make the subrequest.",
          "type": "string"
        },
        "requestId": {
          "title": "Request ID",
          "description": "ID other requests can use to reference this request.",
          "type": "string"
        },
        "body": {
          "title": "Body",
          "description": "The JSON encoded body payload for HTTP requests send a body.",
          "type": "string"
        },
        "headers": {
          "title": "Headers",
          "description": "HTTP headers to be sent with the request.",
          "type": "object",
          "additionalProperties": true,
          "patternProperties": {
            ".*": {
              "type": "string"
            }
          }
        },
        "waitFor": {
          "title": "Parent ID",
          "description": "ID of other requests that this request depends on.",
          "type": "array",
          "items": {
            "type": "string",
            "description": "ID of another request that is a dependency for this one."
          }
        }
      }
    }
  }
}