2021-09-15 02:50:55 +00:00
|
|
|
{
|
|
|
|
|
"$schema": "https://json-schema.org/",
|
|
|
|
|
"$id": "https://tooljet.io/Mongodb.schema.json",
|
|
|
|
|
"title": "Mongodb datasource",
|
|
|
|
|
"description": "A schema defining mongodb datasource",
|
|
|
|
|
"type": "object",
|
2021-09-22 05:13:12 +00:00
|
|
|
"source": {
|
|
|
|
|
"name": "MongoDB",
|
|
|
|
|
"kind": "mongodb",
|
|
|
|
|
"exposedVariables": {
|
|
|
|
|
"isLoading": {},
|
|
|
|
|
"data": {},
|
|
|
|
|
"rawData": {}
|
|
|
|
|
},
|
|
|
|
|
"options": {
|
|
|
|
|
"host": { "type": "string" },
|
|
|
|
|
"port": { "type": "string" },
|
|
|
|
|
"username": { "type": "string" },
|
|
|
|
|
"password": { "type": "string", "encrypted": true },
|
|
|
|
|
"connection_type": { "type": "options" },
|
|
|
|
|
"connection_string": { "type": "string", "encrypted": true }
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-11-22 08:22:32 +00:00
|
|
|
"defaults": {
|
|
|
|
|
"database": { "value": "" },
|
|
|
|
|
"host": { "value": "localhost" },
|
|
|
|
|
"port": { "value": 27017 },
|
|
|
|
|
"username": { "value": "" },
|
|
|
|
|
"password": { "value": "" },
|
|
|
|
|
"connection_type": { "value": "manual" },
|
|
|
|
|
"connection_string": { "value": "" }
|
|
|
|
|
},
|
2021-09-15 02:50:55 +00:00
|
|
|
"properties": {
|
|
|
|
|
"connection_type": {
|
|
|
|
|
"$label": "",
|
|
|
|
|
"$key": "connection_type",
|
|
|
|
|
"type": "dropdown-component-flip",
|
|
|
|
|
"description": "Single select dropdown for connection_type",
|
|
|
|
|
"$options": [
|
|
|
|
|
{ "name": "Manual connection", "value": "manual" },
|
|
|
|
|
{ "name": "Connect using connection string", "value": "string" }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"manual": {
|
|
|
|
|
"host": {
|
|
|
|
|
"$label": "Host",
|
|
|
|
|
"$key": "host",
|
|
|
|
|
"type": "text",
|
|
|
|
|
"description": "Enter host"
|
|
|
|
|
},
|
|
|
|
|
"port": {
|
|
|
|
|
"$label": "Port",
|
|
|
|
|
"$key": "port",
|
|
|
|
|
"type": "text",
|
|
|
|
|
"description": "Enter port"
|
|
|
|
|
},
|
|
|
|
|
"database": {
|
|
|
|
|
"$label": "Database Name",
|
|
|
|
|
"$key": "database",
|
|
|
|
|
"type": "text",
|
|
|
|
|
"description": "Name of the database"
|
|
|
|
|
},
|
|
|
|
|
"username": {
|
|
|
|
|
"$label": "Username",
|
|
|
|
|
"$key": "username",
|
|
|
|
|
"type": "text",
|
2021-09-22 05:13:12 +00:00
|
|
|
"description": "Enter username"
|
2021-09-15 02:50:55 +00:00
|
|
|
},
|
|
|
|
|
"password": {
|
|
|
|
|
"$label": "Password",
|
|
|
|
|
"$key": "password",
|
|
|
|
|
"type": "password",
|
2021-09-22 05:13:12 +00:00
|
|
|
"description": "Enter password"
|
2021-09-15 02:50:55 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"string": {
|
|
|
|
|
"connection_string": {
|
|
|
|
|
"$label": "Connection string",
|
|
|
|
|
"$key": "connection_string",
|
|
|
|
|
"type": "text",
|
|
|
|
|
"description": "mongodb+srv://tooljet:<password>@cluster0.i1vq4.mongodb.net/mydb?retryWrites=true&w=majority"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|