-
Notifications
You must be signed in to change notification settings - Fork 0
/
json.schema.json
78 lines (78 loc) · 2.6 KB
/
json.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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Flat File Validator JSON Schema for File Structure",
"type": "object",
"properties": {
"recordTypePos": {
"type": "integer",
"description": "Position of the record type field in the records, starting from 1"
},
"recordTypeLength": {
"type": "integer",
"description": "Length of the record type field"
},
"recordTypes": {
"type": "array",
"description": "Array with all record types",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id (name) of the record type"
},
"fields": {
"type": "array",
"description": "Array with all fields of the record type, it must be in the order left to right",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id (name) of the field"
},
"length": {
"type": "integer",
"description": "Length of the field"
},
"obligatory": {
"type": "boolean",
"description": "Flag (true / false) if a field is obligatory. If it is obligatory then it can not contain only spaces"
},
"allowedValues": {
"type": "array",
"description": "An array with all allowedValues. If the array is empty then it will not be checked",
"items": {}
},
"regex": {
"type": "string",
"description": "A regex that the field content must match. If the regex is empty then it will not be checked. Please be aware that you have to enter it in JSON format. This means, that you have to escape for example a backslash with two backslashs"
}
},
"required": [
"id",
"length",
"obligatory",
"allowedValues",
"regex"
]
}
]
}
},
"required": [
"id",
"fields"
]
}
]
}
},
"required": [
"recordTypeLength",
"recordTypePos",
"recordTypes"
]
}