Skip to content

Commit

Permalink
Update to the migrate conflict use case
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienlevert committed Dec 8, 2023
1 parent a0fcaeb commit 130dfd1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion specs/cli/config-migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

This command is valuable in cases where a code base was created with Kiota v1.0 and needs to be migrated to the latest version of Kiota. The `kiota config migrate` command will identify and locate the closest `kiota-config.json` file available. If a file can't be found, it would initialize a new `kiota-config.json` file. Then, it would identify all `kiota-lock.json` files that are within this folder structure and add each of them to the `kiota-config.json` file. Adding the clients to the `kiota-config.json` file would not trigger the generation as it only affects the `kiota-config.json` file. The `kiota client generate` command would need to be executed to generate the code for the clients.

In the case where conflicting API client names would be migrated, the command will error out and invite the user to re-run the command providing more context for the `--client-name` parameter.

## Parameters

| Parameters | Required | Example | Description |
| -- | -- | -- | -- |
| `--config-location \| --cl` | No | ../../ | A location where to find or create the `kiota-config.json` file. When not specified it will find an ancestor `kiota-config.json` file and if not found, will use the defaults. Defaults to `./`. |
| `--lock-location \| --ll` | No | ./output/pythonClient/kiota-lock.json | Location of the `kiota-lock.json` file. If not specified, all `kiota-lock.json` files within in the current directory tree will be used. In the case where conflicting API client names are created, the user would be prompted for a new client name |
| `--lock-location \| --ll` | No | ./output/pythonClient/kiota-lock.json | Location of the `kiota-lock.json` file. If not specified, all `kiota-lock.json` files within in the current directory tree will be used. |
| `--client-name \| --cn` | No | graphDelegated | Used with `--lock-location`, it would allow to specify a name for the API client. Else, name is auto-generated as a concatenation of the `language` and `clientClassName`. |

## Using `kiota config migrate`
Expand Down

0 comments on commit 130dfd1

Please sign in to comment.