-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathschema.json
162 lines (162 loc) · 5.28 KB
/
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Data source component",
"description": "This is the schema for the data source object, including name, columns, access rules, and entries.",
"properties": {
"name": {
"title": "The name of the data source.",
"type": "string"
},
"columns": {
"title": "The list of columns included in the data source.",
"type": "array",
"items": {
"type": "string"
}
},
"accessRules": {
"title": "The access rules for the data source.",
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"title": "The type of access rule. Possible values are 'select', 'insert', 'update', 'delete'.",
"type": "array",
"items": {
"type": "string",
"enum": ["select", "insert", "update", "delete"]
}
},
"allow": {
"title": "The access rule allowing specific conditions.",
"anyOf": [
{
"type": "object",
"properties": {
"tokens": {
"title": "Access is allowed based on tokens provided.",
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": ["tokens"]
},
{
"title": "Access is allowed for 'loggedIn' users or 'all' users.",
"type": "string",
"enum": ["loggedIn", "all"]
},
{
"title": "Access is allowed based on user properties.",
"type": "object",
"properties": {
"user": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"equals": {
"title": "Property value must be equal to the specified string.",
"type": "string"
},
"notequals": {
"title": "Property value must not be equal to the specified string.",
"type": "string"
},
"contains": {
"title": "Property value must contain the specified string.",
"type": "string"
}
}
}
}
},
"required": ["user"],
"additionalProperties": false
}
]
},
"appId": {
"title": "The list of application IDs allowed for access.",
"type": "array",
"items": {
"type": "integer"
}
},
"enabled": {
"title": "Specifies whether the access rule is enabled or disabled.",
"type": "boolean"
},
"include": {
"title": "The list of columns to include for this access rule.",
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"title": "The list of columns to exclude for this access rule.",
"type": "array",
"items": {
"type": "string"
}
},
"require": {
"title": "The list of columns or property requirements for this access rule.",
"type": "array",
"items": {
"anyOf": [
{
"title": "The required column for this access rule.",
"type": "string"
},
{
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"equals": {
"title": "Property value must be equal to the specified string.",
"type": "string"
},
"notequals": {
"title": "Property value must not be equal to the specified string.",
"type": "string"
},
"contains": {
"title": "Property value must contain the specified string.",
"type": "string"
}
},
"additionalProperties": false
}
}
]
}
},
"name": {
"title": "The name of the access rule.",
"type": "string"
},
"script": {
"title": "The custom script used for evaluating the access rule.",
"type": "string"
}
},
"required": ["type", "enabled"]
}
},
"entries": {
"title": "The entries (data) for the data source.",
"type": "array",
"items": {
"type": "object"
}
}
},
"required": ["name", "columns", "accessRules", "entries"]
}