Skip to content

fix: align CLI HelpText defaults and descriptions with JSON schema (Group 2)#3417

Merged
souvikghosh04 merged 11 commits into
mainfrom
Usr/sogh/grp2-schema-cli-mismatch
Apr 24, 2026
Merged

fix: align CLI HelpText defaults and descriptions with JSON schema (Group 2)#3417
souvikghosh04 merged 11 commits into
mainfrom
Usr/sogh/grp2-schema-cli-mismatch

Conversation

@souvikghosh04
Copy link
Copy Markdown
Contributor

@souvikghosh04 souvikghosh04 commented Apr 7, 2026

Summary

Fixes 14 issues where CLI option --help text showed incorrect default values, wrong descriptions, or enum mismatches compared to the JSON schema (dab.draft.schema.json) and C# runtime defaults.

Issues Addressed

2a. Default Value Mismatches (8 issues)

# Property Before After Resolution
#3347 runtime.mcp.dml-tools.read-records CLI: true, Schema: false Both: true Schema changed false?true to match C# runtime
#3348 runtime.mcp.dml-tools.create-record CLI: true, Schema: false Both: true Schema changed false?true to match C# runtime
#3349 runtime.mcp.dml-tools.describe-entities CLI: true, Schema: false Both: true Schema changed false?true to match C# runtime
#3350 runtime.graphql.multiple-mutations.create.enabled CLI: true, Schema: false CLI: false HelpText corrected to match schema
#3351 runtime.host.mode CLI: Development, Schema: production CLI: production HelpText corrected to match schema
#3352 data-source.options.set-session-context CLI: "(default)" text No default Removed misleading text
#3353 runtime.rest.request-body-strict init: false, Schema: true init: false HelpText corrected to match schema
#3354 runtime.mcp.dml-tools.aggregate-records Schema: .enabled=true, top-level=false Both: true Schema changed false?true to match C# runtime

2b. Description/Display Bugs (3 issues)

# Property Fix
#3355 --otel-service-name Changed description from "Headers for Open Telemetry" to "Service name for Open Telemetry"
#3356 dab add-telemetry options Removed duplicate (Default: X) from HelpText where Default= attribute already displays the value
#3357 runtime.graphql.depth-limit Changed description from "infinity"/"-1" to "Default: null (no limit)"

2c. Enum Mismatches (3 issues)

# Property Fix
#3359 --database-type (configure) Already fixed in PR #3409
#3360 --database-type (configure) Changed to lowercase enum values

Cross-group overlaps resolved

Files Changed

File Changes
src/Cli/Commands/ConfigureOptions.cs 5 HelpText corrections (host.mode, multiple-mutations, set-session-context, depth-limit, database-type)
src/Cli/Commands/InitOptions.cs 2 HelpText corrections (request-body-strict, database-type)
src/Cli/Commands/AddTelemetryOptions.cs 4 HelpText/description corrections
schemas/dab.draft.schema.json DML tool defaults changed false?true (8 locations) to match C# runtime (DmlToolsConfig.DEFAULT_ENABLED = true)

Testing

  • ConfigureOptionsTests: 78 passed, 0 failed
  • EndToEndTests: 138 passed, 0 failed, 3 skipped
  • Build: 0 warnings, 0 errors

Fixes 14 issues where CLI option help text showed incorrect default
values or descriptions that didn't match the JSON schema:

ConfigureOptions.cs:
- DML tool defaults: true -> false (7 tools: #3347-#3353)
- multiple-mutations.create.enabled default: true -> false (#3354)
- host.mode default: Development -> production (#3355)
- set-session-context: removed misleading '(default)' text (#3356)
- depth-limit default: infinity -> null (no limit) (#3357)
- database-type: use lowercase values, add cosmosdb_postgresql (#3358)

InitOptions.cs:
- rest.request-body-strict default: false -> true (#3360)
- database-type: remove dwsql (not in schema) (#3358)

AddTelemetryOptions.cs:
- Remove duplicate '(Default: X)' from HelpText where Default= attribute
  already displays the value (#3356)
- Fix otel-service-name description from 'Headers' to 'Service name'

dab.draft.schema.json:
- aggregate-records object form .enabled default: true -> false to match
  top-level default (#3347)
@souvikghosh04 souvikghosh04 self-assigned this Apr 8, 2026
@souvikghosh04 souvikghosh04 added this to the April 2026 milestone Apr 8, 2026
@souvikghosh04 souvikghosh04 linked an issue Apr 8, 2026 that may be closed by this pull request
19 tasks
@souvikghosh04 souvikghosh04 moved this from Todo to In Progress in Data API builder Apr 8, 2026
@souvikghosh04 souvikghosh04 added bug Something isn't working cli assign-for-review labels Apr 8, 2026
@souvikghosh04 souvikghosh04 marked this pull request as ready for review April 14, 2026 09:51
Copilot AI review requested due to automatic review settings April 14, 2026 09:51
@souvikghosh04 souvikghosh04 moved this from In Progress to Review In Progress in Data API builder Apr 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Aligns CLI --help output with the JSON schema and runtime defaults by correcting default values, descriptions, and enum/value lists.

Changes:

  • Updated CLI option HelpText defaults/descriptions for init, configure, and add-telemetry commands.
  • Corrected allowed/enum value lists (notably database type values/casing).
  • Updated JSON schema defaults for MCP DML tools to reflect runtime behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/Cli/Commands/InitOptions.cs Adjusts --database-type supported values list and updates HelpText default for rest.request-body-strict.
src/Cli/Commands/ConfigureOptions.cs Fixes HelpText for database type values/casing, removes misleading default text, and corrects GraphQL/host-mode defaults/description.
src/Cli/Commands/AddTelemetryOptions.cs Removes duplicated default text (when Default= is present) and fixes OTEL service-name description.
schemas/dab.draft.schema.json Changes MCP DML tool defaults to true to match runtime defaults.

Comment thread src/Cli/Commands/ConfigureOptions.cs Outdated
Comment thread src/Cli/Commands/InitOptions.cs Outdated
Comment thread src/Cli/Commands/ConfigureOptions.cs Outdated
Comment thread src/Cli/Commands/AddTelemetryOptions.cs Outdated
Comment thread schemas/dab.draft.schema.json Outdated
Co-authored-by: Aniruddh Munde <anmunde@microsoft.com>
@souvikghosh04 souvikghosh04 merged commit d8e0aa4 into main Apr 24, 2026
12 checks passed
@souvikghosh04 souvikghosh04 deleted the Usr/sogh/grp2-schema-cli-mismatch branch April 24, 2026 18:59
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Data API builder Apr 24, 2026
Aniruddh25 pushed a commit that referenced this pull request Apr 28, 2026
## Why make this change?

Parent issue #3466 
Closes #3366 — `runtime.rest.enabled` has no `default` in the JSON
schema
Closes #3367 — `runtime.graphql.enabled` has no `default` in the JSON
schema

These schema properties were missing an explicit `default` value.

5 of 7 Group 4 issues (#3378#3382) were already fixed in PR #3417 as
Group 2 overlaps.

## What is this change?

Adds `"default": true` to the `enabled` property under both
`runtime.rest` and `runtime.graphql` in `schemas/dab.draft.schema.json`.
This matches the C# runtime behavior where both REST and GraphQL are
enabled by default.

## How was this tested?

Schema-only metadata change — no runtime behavior affected. Validated
that the schema still passes JSON Schema draft-07 validation.

## Sample Request(s)

NA
RubenCerna2079 added a commit that referenced this pull request May 7, 2026
…3417, #3444, #3454, #3471) (#3505)

Cherry-picks CLI HelpText and schema description improvements from main
to release/2.0:

- 45f18e2 lowercase CLI enum values in HelpText and error messages
(Group 3) (#3444)
- d8e0aa4 fix: align CLI HelpText defaults and descriptions with JSON
schema (Group 2) (#3417)
- 93edc20 Missing/Invalid Default Value (Group 4) (#3454)
- acd6bf7 fix: improve schema descriptions (Group 5) (#3471)

**Note:** This PR should be merged after #3504 (CLI structure fixes) as
it depends on the new options introduced there.

---------

Co-authored-by: Aniruddh Munde <anmunde@microsoft.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: RubenCerna2079 <32799214+RubenCerna2079@users.noreply.github.com>
Co-authored-by: Ruben Cerna <rcernaserna@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.0 bug Something isn't working cli

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Schema/CLI Mismatch: Default Values & Descriptions (Group 2)

5 participants