Azure / Azure/data-api-builder

[Enh]: Hide deprecated flags from dab add and update

Open
#3,315 0 comments 0 reactions 1 assignee Claimed by @Aniruddh25 View on GitHub
2.1 cli usability
Dominant language
C#
Stars
1.5k
Forks
370
Avg merge
3d 17h
Merged PRs (30d)
8

Description

## What?

✅ Hide `dab add --source.params` in the CLI `--help` to encourage the new syntax.
✅ Hide `dab update --source.params` in the CLI `--help` to encourage the new syntax.
✅ Hide `dab update --source.key-fields` in the CLI `--help` to encourage the new syntax.
✅ Hide `dab update -m` in the CLI `--help` to encourage the new syntax.
✅ Hide `dab update --map` in the CLI `--help` to encourage the new syntax.

### Include deprecation warning

```
dab add --source.params is deprecated, next time use --parameters.*
dab update --source.params is deprecated, next time use --parameters.*
dab update --source.key-fields is deprecated, next time use --fields.*
dab update -m is deprecated, next time use --fields.*
dab update --map is deprecated, next time use --fields.*
```

## Why?

Encourage the new syntax.

### Parameters

In `dab add` and `update`, this:

```
--source.params Dictionary of parameters and their values...
```

Have been replaced with:

```
--parameters.name Comma-separated list of parameter names for stored procedure.

--parameters.description Comma-separated list of parameter descriptions for stored procedure.

--parameters.required Comma-separated list of parameter required flags (true/false) for stored procedure.

--parameters.default Comma-separated list of parameter default values for stored procedure.
```

### Fields

In `dab update`, these:

```
--source.key-fields The field(s) to be used as primary keys.

-m, --map Specify mappings between database fields...
```

Have been replaced with:

```
--fields.name Name of the database column to expose as a field.

--fields.alias Alias for the field.

--fields.description Description for the field.

--fields.primary-key Set this field as a primary key.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.