ToolJet/plugins/packages/mongodb/lib/manifest.json
Priyansh Rai beb8bcfc65
Fix: Capitalisation inconsistencies in labels (#14174)
* fixed capitalization issue

Signed-off-by: thesynthax <kushagra1403@gmail.com>

* updated changes

Signed-off-by: thesynthax <kushagra1403@gmail.com>

* fix: standardize label casing and formatting in plugin manifests

* fix: standardize label casing in plugin manifests

---------

Signed-off-by: thesynthax <kushagra1403@gmail.com>
Co-authored-by: thesynthax <kushagra1403@gmail.com>
2025-10-22 13:59:18 +05:30

280 lines
7 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/ToolJet/ToolJet/develop/plugins/schemas/manifest.schema.json",
"title": "Mongodb datasource",
"description": "A schema defining mongodb datasource",
"type": "object",
"tj:version": "1.0.0",
"tj:source": {
"name": "MongoDB",
"kind": "mongodb",
"type": "database"
},
"properties": {
"connection_type": {
"type": "string",
"title": "Connection type",
"description": "Single select dropdown for connection_type",
"enum": [
"manual",
"string"
],
"default": "manual"
},
"host": {
"type": "string",
"title": "Host",
"description": "Enter host",
"default": "localhost"
},
"port": {
"type": "number",
"title": "Port",
"description": "Enter port",
"default": 27017
},
"database": {
"type": "string",
"title": "Database name",
"description": "Name of the database"
},
"username": {
"type": "string",
"title": "Username",
"description": "Enter username"
},
"password": {
"type": "string",
"title": "Password",
"description": "Enter password"
},
"tls_certificate": {
"type": "string",
"title": "TLS/SSL certificate",
"description": "Single select dropdown for choosing certificates",
"enum": [
"ca_certificate",
"client_certificate",
"none"
],
"default": "none"
},
"connection_string": {
"type": "string",
"title": "Connection string",
"description": "mongodb+srv://tooljet:<password>@cluster0.i1vq4.mongodb.net/mydb?retryWrites=true&w=majority"
},
"ca_cert": {
"type": "string",
"title": "CA cert",
"description": "Enter CA certificate"
},
"client_key": {
"type": "string",
"title": "Client key",
"description": "Enter client key"
},
"client_cert": {
"type": "string",
"title": "Client cert",
"description": "Enter client certificate"
}
},
"tj:encrypted": [
"password",
"ca_cert",
"client_key",
"client_cert",
"connection_string"
],
"required": [
"connection_type"
],
"allOf": [
{
"if": {
"properties": {
"connection_type": {
"const": "manual"
}
}
},
"then": {
"required": [
"host",
"port",
"tls_certificate"
],
"allOf": [
{
"if": {
"properties": {
"tls_certificate": {
"const": "ca_certificate"
}
}
},
"then": {
"required": [
"ca_cert"
]
}
},
{
"if": {
"properties": {
"tls_certificate": {
"const": "client_certificate"
}
}
},
"then": {
"required": [
"client_key",
"client_cert",
"ca_cert"
]
}
}
]
}
},
{
"if": {
"properties": {
"connection_type": {
"const": "string"
}
}
},
"then": {
"required": [
"connection_string"
]
}
}
],
"tj:ui:properties": {
"connection_type": {
"$ref": "#/properties/connection_type",
"key": "connection_type",
"label": "Connection type",
"description": "Single select dropdown for connection_type",
"widget": "dropdown-component-flip",
"list": [
{
"name": "Manual connection",
"value": "manual"
},
{
"name": "Connect using connection string",
"value": "string"
}
]
},
"manual": {
"tls_certificate": {
"label": "TLS/SSL certificate",
"$ref": "#/properties/tls_certificate",
"key": "tls_certificate",
"description": "Single select dropdown for choosing certificates",
"widget": "dropdown-component-flip",
"list": [
{
"value": "ca_certificate",
"name": "CA certificate"
},
{
"value": "client_certificate",
"name": "Client certificate"
},
{
"value": "none",
"name": "None"
}
],
"commonFields": {
"host": {
"$ref": "#/properties/host",
"key": "host",
"label": "Host",
"description": "Enter host",
"widget": "text-v3",
"required": true
},
"port": {
"$ref": "#/properties/port",
"key": "port",
"label": "Port",
"description": "Enter port",
"widget": "text-v3",
"required": true
},
"database": {
"label": "Database name",
"$ref": "#/properties/database",
"key": "database",
"description": "Name of the database",
"widget": "text-v3"
},
"username": {
"$ref": "#/properties/username",
"key": "username",
"label": "Username",
"description": "Enter username",
"widget": "text-v3"
},
"password": {
"$ref": "#/properties/password",
"key": "password",
"label": "Password",
"description": "Enter password",
"widget": "password-v3",
"required": false
}
}
},
"ca_certificate": {
"ca_cert": {
"label": "CA cert",
"$ref": "#/properties/ca_cert",
"key": "ca_cert",
"description": "Enter CA certificate",
"widget": "password-v3-textarea"
}
},
"client_certificate": {
"client_key": {
"label": "Client key",
"$ref": "#/properties/client_key",
"key": "client_key",
"description": "Enter client key",
"widget": "password-v3-textarea"
},
"client_cert": {
"label": "Client cert",
"$ref": "#/properties/client_cert",
"key": "client_cert",
"description": "Enter client certificate",
"widget": "password-v3-textarea"
},
"ca_cert": {
"label": "CA cert",
"$ref": "#/properties/ca_cert",
"key": "ca_cert",
"description": "Enter CA certificate",
"widget": "password-v3-textarea"
}
}
},
"string": {
"connection_string": {
"$ref": "#/properties/connection_string",
"key": "connection_string",
"label": "Connection string",
"description": "mongodb+srv://tooljet:<password>@cluster0.i1vq4.mongodb.net/mydb?retryWrites=true&w=majority",
"widget": "password-v3-textarea",
"required": true
}
}
}
}