-
Notifications
You must be signed in to change notification settings - Fork 0
Frontend ↔ Backend Type Mismatches #12
Copy link
Copy link
Closed
Labels
priority: highImportant, address soonImportant, address soontype: bugSomething isn't workingSomething isn't working
Description
Gap
Connection Types
Frontend (types/index.ts) |
Backend (DataConnection.kt) |
Match? |
|---|---|---|
POSTGRESQL |
POSTGRESQL |
✅ |
MYSQL |
— | ❌ Frontend-only |
MARIADB |
— | ❌ Frontend-only |
MSSQL |
— | ❌ Frontend-only |
ORACLE |
— | ❌ Frontend-only |
SQLITE |
— | ❌ Frontend-only |
MONGODB |
MONGODB |
✅ |
| — | AZURE_SQL |
❌ Backend-only |
| — | MONGODB_COSMOS |
❌ Backend-only |
Selecting a frontend-only type (e.g. MYSQL) causes backend request deserialization/binding to fail (HTTP 400), because the value cannot be mapped to the backend ConnectionType enum.
Generator Types
The frontend defines 16 generator types (e.g. RANDOM_STRING, HASH_SHA256, FAKER) while the backend defines 11 different types (e.g. NAME, SSN, CREDIT_CARD). The two enums are not aligned.
User Roles
Frontend defines ADMIN, USER. Backend model includes an additional VIEWER role in WorkspaceRole. Misalignment can cause issues when rendering workspace user lists.
Affected files:
frontend/src/types/index.tsbackend/src/main/kotlin/com/opendatamask/model/DataConnection.ktbackend/src/main/kotlin/com/opendatamask/model/ColumnGenerator.kt
Required Work
- Align
ConnectionTypeenums so frontend and backend are identical. - Align
GeneratorTypeenums (decide on a single canonical list). - Align
UserRole/WorkspaceRoleenums. - Add end-to-end type validation or a shared schema (e.g. OpenAPI spec generation from the backend).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: highImportant, address soonImportant, address soontype: bugSomething isn't workingSomething isn't working