Fix: --fields.description and --parameters.description truncated at first comma#3464
Fix: --fields.description and --parameters.description truncated at first comma#3464
Conversation
Agent-Logs-Url: https://github.com/Azure/data-api-builder/sessions/bc7d8105-7653-4b84-b424-285b88a699ee Co-authored-by: Aniruddh25 <3513779+Aniruddh25@users.noreply.github.com>
|
@copilot, how would multiple fields be specified in the command line if the separator For example, when there are 2 fields, how do I specify the description for RecordIsSold? |
The intended design (as shown in the existing Aspire sample) is to run one dab update Products --fields.name "RecordIsActive" --fields.description "Indicates whether the record is active. When false, the record may be historical"
dab update Products --fields.name "RecordIsSold" --fields.description "Indicates whether the record has been sold, with comma, etc."Each call accumulates into the entity's |
Why make this change?
--fields.descriptionsplits description strings on commas, silently truncating any description containing one. For example:Produces in
dab-config.json:{ "name": "RecordIsActive", "description": "Indicates whether the record is active. When false" }This is particularly impactful for MCP scenarios where rich field descriptions are critical for LLM context.
What is this change?
fields.descriptionandparameters.descriptioninEntityOptions.cswere declared withSeparator = ',', causing the CommandLine library to tokenize the description value on every comma.Separator = ','from[Option("fields.description")]Separator = ','from[Option("parameters.description")]TestUpdateFieldDescriptionWithCommascovering both comma-containing and plain descriptionsMultiple fields are specified by running one
dab updatecall per field — the established pattern used throughout the existing samples. Each invocation accumulates into the entity'sfieldsarray in the config:How was this tested?
Sample Request(s)
Result in
dab-config.json:{ "name": "RecordIsActive", "description": "Indicates whether the record is active. When false, the record may be historical and still exist, but is no longer actively used. Type: boolean", "primary-key": false }