Skip to content

feat(datasource): expose driver catalog with config JSON Schema#2083

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/driver-config-schema
Jun 21, 2026
Merged

feat(datasource): expose driver catalog with config JSON Schema#2083
xuyushun441-sys merged 1 commit into
mainfrom
feat/driver-config-schema

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Summary

DriverDefinitionSchema.configSchema ("Used by the UI to generate the connection form") shipped empty for every driver, so the Studio datasource editor could only offer a raw-JSON editor for config. This adds GET /api/v1/datasources/drivers — a curated catalog of connection drivers (memory / sqlite / postgres / mysql / mongo), each with a JSON-Schema configSchema describing its connection options.

  • New driver-catalog.ts with DRIVER_CATALOG (JSON-Schema configSchema per driver, e.g. sqlite → { filename }, postgres → host/port/database/user/password/ssl/schema).
  • New GET /datasources/drivers route in service-datasource admin routes — static metadata, no datasource-admin service dependency (always available).

This unblocks the objectui Studio datasource connection form (a follow-up consumer PR). A future runtime driver registry can supersede the curated catalog without changing the route contract.

Verification

service-datasource tests pass (6/6 in admin-routes), including a new case asserting GET /drivers returns the catalog with sqlite's filename config schema.

🤖 Generated with Claude Code

Add GET /api/v1/datasources/drivers — a curated catalog of connection drivers
(memory / sqlite / postgres / mysql / mongo), each with a JSON-Schema
`configSchema` describing its connection options. This is the
DriverDefinitionSchema.configSchema contract ('Used by the UI to generate the
connection form'), which shipped empty for every driver.

The Studio datasource editor can now fetch this to render a typed connection
form instead of a raw-JSON editor. Static metadata, served without a
datasource-admin service dependency (always available); a future runtime driver
registry can supersede the catalog without changing the route contract.

Test: GET /drivers returns the catalog with sqlite's filename config schema.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 21, 2026 1:58am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): packages/services.

5 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/guides/packages.mdx (via packages/services)
  • content/docs/guides/runtime-services/audit-service.mdx (via packages/services)
  • content/docs/guides/runtime-services/index.mdx (via packages/services)
  • content/docs/guides/runtime-services/settings-service.mdx (via packages/services)
  • content/docs/protocol/objectos/i18n-standard.mdx (via packages/services)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@xuyushun441-sys
xuyushun441-sys merged commit 713d405 into main Jun 21, 2026
16 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the feat/driver-config-schema branch June 21, 2026 02:20
xuyushun441-sys added a commit that referenced this pull request Jun 21, 2026
…tion (#2112)

The README mentioned "REST routes under /api/v1/datasources" but didn't
enumerate them, and predated the Studio integration. Add:
- a REST routes section (lifecycle + drivers catalog + by-name test + GET :name
  detail + introspection/sync routes), with the credential-split note;
- a Studio integration section: datasource is managed through the metadata-admin
  engine (Setup → Integrations → Datasources), runtime records persist to
  sys_metadata and rehydrate on restart.

Reflects #2083 (drivers), #2085 (remote-tables/object-draft/by-name test),
#2086 (GET :name), #2091 (Setup nav), #2096 (persistence).

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants