-
Couldn't load subscription status.
- Fork 283
Labels
Milestone
Description
Here’s your updated version with type completely removed (no longer a sub-property, and no references in validation or schema behavior):
What?
Add richer metadata for entity fields and keys.
Why?
Enable semantic metadata for documentation, client generation, and MCP tools.
Allows deprecation of the old mapping and source.key-fields properties.
How?
- Introduce
fieldsproperty in config - Introduce
fields.nameproperty in config - Introduce
fields.aliasproperty in config - Introduce
fields.descriptionproperty in config - Introduce
fields.primary-keyproperty in config - Update JSON schema (precludes
mappingsandsource.key-fields) - Add
field aliastodab add - Add
field descriptiontodab add - Add
field primary-keytodab add - Add
field aliastodab update - Add
field descriptiontodab update - Add
field primary-keytodab update - Add
fieldstodab validate(warn if missing and MCP enabled) - Add
descriptionto OpenAPI, GraphQL, and MCPdescribe_entitiesresponse
P1
- Auto-migrate old
mappingtofieldswhen--keyflag is used - Auto-migrate old
mappingtofieldswhen--fieldflag is used - Auto-migrate old
mappingtofieldswhen--mappingflag is used - Auto-migrate old
key-fieldstofieldswhen--key-fieldsflag is used
Change
Before
Entity used mapping and source.key-fields:
{
"entities": {
"{entity-name}": {
"source": {
"object": "dbo.Table",
"key-fields": [
"UserId"
]
},
"mapping": {
"dbField1": "exposedName1",
"dbField2": "exposedName2"
}
}
}
}After
Entity uses separate keys and fields:
Backward Compatibility
mappingandsource.key-fieldsstill supported- If
keysis present, legacy props (mappingandkey-fields) must be omitted (validation) - New features (like
description) only available infields - Plan to phase out
mappingandkey-fieldsfrom docs
Validation
namemust match a database columnaliasmust be unique per entity- Key uniqueness enforced
Command Line
Legacy syntax (still supported):
dab add User --source dbo.Users --map "UserId:id,EmailAddress:email,Name:name"
dab add User --source dbo.Users --source.key-fields "UserId,Name"New syntax: keys
dab add User --field "Email" --alias "Email"
dab add User --field "Email" --description "My description"
dab add User --field "Email" --primary-key true
dab update User --field "Email" --alias "Email"
dab update User --field "Email" --description "My description"
dab update User --field "Email" --primary-key trueMetadata
Metadata
Assignees
Labels
Type
Projects
Status
Done