/
json_storer.schema.json
38 lines (38 loc) · 1.28 KB
/
json_storer.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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/houtianze/rest-replayer/master/storer/json_storer.schema.json#",
"type": "object",
"definitions": {
"requestResponseMapping": {
"type": "object"
},
"requestResponseArray": {
"type": "array"
}
},
"properties": {
"version": {
"type": "integer",
"minimum": 1,
"$comment": "Version number in integer, currently 1."
},
"name": {
"type": "string",
"pattern": "^[_.0-9a-zA-Z]+$",
"default": "default",
"$comment": "Name of the record"
},
"responseRetention": {
"type": "string",
"enum": ["latest", "oldest", "sequential"],
"default": "latest",
"$comment": "What to do with multiple responses received for the same request:\n - latest: keep the latest (default).\n - oldest: keep the earliest record.\n - sequetial: Keep all the responses in one array (NOT yet implemented)."
},
"mapping": {
"anyOf": [
{ "$ref": "#/definitions/requestResponseMapping" }
]
}
},
"required": ["version", "name"]
}