Skip to content

Conversation

@lovincyrus
Copy link
Contributor

@lovincyrus lovincyrus commented Jan 13, 2026

This PR refactors all connector forms to use a unified JSON schema-based validation and rendering system, replacing the previous Yup-based validation approach.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@lovincyrus lovincyrus self-assigned this Jan 13, 2026
@lovincyrus lovincyrus force-pushed the cyrus/all-connectors-json-schema branch from 274c8cd to 45c3e9f Compare January 13, 2026 22:59
@lovincyrus lovincyrus requested a review from royendo January 14, 2026 18:54
@royendo
Copy link
Contributor

royendo commented Jan 14, 2026

bug:
when athen errors, typing doesnt clear error
Screenshot 2026-01-14 at 15 42 13

nit:
bigquery should not have project-id as optional, errors if its not there
also a Title like AWS Access Key ID in athena would be great "GCP Credential", "Service Account JSON", etc.
Screenshot 2026-01-14 at 15 42 16

Are we not going to add HTTPS connector as two step in this PR? fine to do in in another, but we're already here so might as well.

Seeing we removed clickhosue specific forms, can we also split clickhouse-cloud and clickhouse into separate .ts?
same with adding two step here, we're already in the .ts files (but thats just my Product opinion, defer to @ericpgreen2 for code work)

Copy link
Contributor

@royendo royendo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above :)

@lovincyrus
Copy link
Contributor Author

bug: when athen errors, typing doesnt clear error Screenshot 2026-01-14 at 15 42 13

nit: bigquery should not have project-id as optional, errors if its not there also a Title like AWS Access Key ID in athena would be great "GCP Credential", "Service Account JSON", etc. Screenshot 2026-01-14 at 15 42 16

Addressed both! The main focus of this branch is to land the schema-driven design for all connectors. I plan to tackle others when the base branch is clean.

@lovincyrus lovincyrus requested a review from royendo January 14, 2026 23:20
@lovincyrus lovincyrus marked this pull request as ready for review January 14, 2026 23:21
Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good progress on migrating connectors to JSON Schema. The schema files are well-structured and the JSONSchemaFormRenderer is now generic. However, there are architectural concerns that should be addressed to fully realize the vision from PR #8467.

ClickHouse is not using the JSON Schema system

ClickhouseFormRenderer.svelte renders fields by iterating over clickhouseUiState?.filteredProperties, which originates from the backend's configProperties:

// ClickhouseFormRenderer.svelte:61
{#each clickhouseUiState?.filteredProperties ?? [] as property (property.key)}
  ...
  {#if property.type === ConnectorDriverPropertyType.TYPE_STRING ...}

This means ClickHouse has a JSON Schema (schemas/clickhouse.ts) that's only used for validation, not rendering. The form structure still comes from the backend.

The unique ClickHouse patterns—connector type selector, Parameters/DSN tabs, conditional SSL/port behavior—should be modeled as JSON Schema extensions so JSONSchemaFormRenderer can render them:

  • The connector type selector is already a radio enum pattern (x-display: "radio")
  • Parameters/DSN tabs could use x-display: "tabs" or x-input-mode (per the migration path in #8467)
  • Conditional field behavior already works via allOf/if/then

Once modeled in the schema, ClickhouseFormRenderer.svelte can be deleted and ClickHouse can flow through the same path as other connectors.

Frontend still consumes backend configProperties/sourceProperties

The design doc vision was for JSON Schema to be the single source of truth. Currently, backend properties are still consumed in multiple places:

  • FormRenderer.svelte - renders entirely from ConnectorDriverProperty[]
  • AddDataFormManager.ts:164-191, 430-441 - derives properties, DSN detection, initial values
  • MultiStepConnectorFlow.svelte:59-60, 77 - uses sourceProperties/configProperties for initialization
  • sourceUtils.ts:229-242 - iterates over properties for form data preparation

For connectors with JSON Schemas, the schema should drive everything: field structure, labels, placeholders, hints, and validation. Backend properties should only be a fallback during migration.

What "done" looks like

Before we consider the JSON Schema migration complete, we need:

  • Tabs support in JSONSchemaFormRenderer - Model the Parameters/DSN pattern as a schema extension (e.g., x-display: "tabs" with x-tab-group). This unblocks ClickHouse and other connectors with dual input modes.

  • ClickHouse rendering through JSONSchemaFormRenderer - Delete ClickhouseFormRenderer.svelte once the schema can express all its UI patterns.

  • Schema-driven connectors stop reading configProperties/sourceProperties - Derive field metadata from the schema. This may require enriching schemas with x-placeholder, x-hint, etc. where they're currently missing.

Without these, we have two parallel rendering systems that must be maintained independently.


Developed in collaboration with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants