update seach source connector schema

This commit is contained in:
CREDO23 2025-07-30 21:33:38 +02:00
parent 8958970320
commit 161d9c7b91

View file

@ -167,6 +167,18 @@ class SearchSourceConnectorBase(BaseModel):
if not config.get("CONFLUENCE_BASE_URL"):
raise ValueError("CONFLUENCE_BASE_URL cannot be empty")
elif connector_type == SearchSourceConnectorType.CLICKUP_CONNECTOR:
# For CLICKUP_CONNECTOR, only allow CLICKUP_API_TOKEN
allowed_keys = ["CLICKUP_API_TOKEN"]
if set(config.keys()) != set(allowed_keys):
raise ValueError(
f"For CLICKUP_CONNECTOR connector type, config must only contain these keys: {allowed_keys}"
)
# Ensure the API token is not empty
if not config.get("CLICKUP_API_TOKEN"):
raise ValueError("CLICKUP_API_TOKEN cannot be empty")
return config