This repository has been archived by the owner on Apr 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
http-types-schema.json
107 lines (107 loc) · 3.47 KB
/
http-types-schema.json
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://meeshkan.com/http-request-response.json",
"type": "object",
"title": "HttpExchange",
"description": "A HTTP request and response pair.",
"required": [ "request" ],
"properties": {
"request": {
"title": "HttpRequest",
"description": "A HTTP request.",
"type": "object",
"required": ["protocol", "method", "headers", "host"],
"properties": {
"method": {
"title": "HttpMethod",
"description": "The HTTP method of a request.",
"type": "string",
"enum": ["get", "put", "post", "patch", "delete", "options", "trace", "head", "connect"]
},
"protocol": {
"title": "HttpProtocol",
"description": "The protocol of the request, either unencrypted http or encrypted https.",
"type": "string",
"enum": ["http", "https"]
},
"host": {
"title": "HttpHost",
"description": "The hostname and optional port, as in '$HOSTNAME[:$PORT]'.",
"type": "string"
},
"path": {
"description": "Path name and query parameters, as in '/a/path?q=v'. This duplicates the information in 'pathname' and 'query', so should not be present at the same time.",
"type": "string"
},
"pathname": {
"description": "Path name without query parameters, as in '/a/path'. This duplicates the information in 'path', so should not be present at the same time.",
"type": "string"
},
"query": {
"type": "object",
"required": [],
"additionalProperties": {
"anyOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
]
}
},
"headers": {
"type": "object",
"required": [],
"additionalProperties": {
"anyOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
]
}
},
"body": {
"title": "HttpRequestBody",
"description": "The request body string.",
"type": "string"
},
"timestamp": {
"title": "HttpRequestTimestamp",
"description": "The time at which the HTTP request was initiated in ISO 8601 format, as in '2018-11-13T20:20:39+00:00'.",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
},
"response": {
"title": "HttpResponse",
"description": "A HTTP response.",
"type": "object",
"required": [ "statusCode" ],
"properties": {
"statusCode": {
"type": "number"
},
"body": {
"type": "string"
},
"headers": {
"type": "object",
"required": [],
"additionalProperties": {
"anyOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
]
}
},
"timestamp": {
"title": "HttpResponseTimestamp",
"description": "The time at which the HTTP response was completed on the server side in ISO 8601 format, as in '2018-11-13T20:20:39+00:00'.",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}