-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathschema.json
203 lines (203 loc) · 7.11 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://github.com/Kamefrede/sql2meili/schema.json",
"type": "object",
"title": "SQL2Meili Config Json Schema",
"description": "",
"default": {},
"examples": [
{
"database": {
"adapter": "postgresql",
"host": "localhost",
"port": 5432,
"username": "postgres",
"password": "password",
"database": "postgres",
"tables": [
"movies"
]
},
"meilisearch": {
"host": "localhost",
"api_key": "verycoolapikey",
"indexes": [
"movies"
]
}
}
],
"required": [
"database",
"meilisearch"
],
"properties": {
"database": {
"$id": "sql2meili_database",
"type": "object",
"title": "Database Connection Schema",
"description": "The schema that is required to create a database connection",
"default": {},
"examples": [
{
"adapter": "postgresql",
"host": "localhost",
"port": 5432,
"username": "postgres",
"password": "password",
"database_name": "postgres",
"tables": [
"movies"
]
}
],
"required": [
"adapter",
"host",
"username",
"password",
"database_name",
"tables"
],
"properties": {
"adapter": {
"$id": "sql2meili_database_adapter",
"type": "string",
"title": "Database Adapter",
"description": "Defines what adapter to use for connection to the database",
"default": "",
"examples": [
"postgresql",
"mysql",
"sqlite"
]
},
"host": {
"$id": "sql2meili_database_host",
"type": "string",
"title": "Database Host",
"description": "Defines the host where the database is located",
"default": "",
"examples": [
"localhost",
"127.0.0.1"
]
},
"port": {
"$id": "sql2meili_database_port",
"type": "integer",
"title": "Database Port",
"description": "Defines the port where the database server is accessible",
"default": 5432,
"examples": [
5432
]
},
"username": {
"$id": "sql2meili_database_username",
"type": "string",
"title": "Database Username",
"description": "Defines what user to log in as when connecting to the database",
"default": "",
"examples": [
"postgres"
]
},
"password": {
"$id": "sql2meili_database_password",
"type": "string",
"title": "Database Password",
"description": "Defines the password of the user that is used when connecting to the database",
"default": "",
"examples": [
"password"
]
},
"database_name": {
"$id": "sql2meili_database_name",
"type": "string",
"title": "Database Name",
"description": "Defines the database name to access when exporting the tables",
"default": "",
"examples": [
"postgres"
]
},
"tables": {
"$id": "sql2meili_database_tables",
"type": "array",
"title": "Database tables",
"description": "Defines which tables to pull export data from",
"default": [],
"examples": [
[
"movies"
]
],
"additionalItems": true
}
},
"additionalProperties": false
},
"meilisearch": {
"$id": "sql2meili_meilisearch",
"type": "object",
"title": "Meilisearch Connection Schema",
"description": "The schema that is required to create a Meilisearch connection",
"default": {},
"examples": [
{
"host": "localhost",
"api_key": "verycoolapikey",
"indexes": [
"movies"
]
}
],
"required": [
"host",
"api_key"
],
"properties": {
"host": {
"$id": "sql2meili_meilisearch_host",
"type": "string",
"title": "MeiliSearch Host",
"description": "Defines the host where the meilisearch instance is located",
"default": "",
"examples": [
"localhost",
"127.0.0.1"
]
},
"api_key": {
"$id": "sql2meili_meilisearch_api_key",
"type": "string",
"title": "MeiliSearch API Key",
"description": "Defines the API key to be used when connecting to the MeiliSearch instance",
"default": "",
"examples": [
"verycoolapikey",
"realapikeyperhaps",
"hunter2"
]
},
"indexes": {
"$id": "sql2meili_meilisearch_indexes",
"type": "array",
"title": "Meilisearch Indexes",
"description": "If this array is not present, SQL2Meili will assume the table names are also the same as the index names",
"default": [],
"examples": [
[
"movies"
]
],
"additionalItems": true
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}