Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update configure-cli.md #12168

Merged
merged 3 commits into from
Dec 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions documentation/code-gen/configure-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ python-sdk-output-folder: "$(az-output-folder)/azext_communication/vendored_sdks
```

~~~
where 1) the `extensions` means the name of the azure cli command modules,
2) the `namespace` means the python SDK namespace,
3) the `package-name` is the python SDK package name,
4) the `azure-cli-extension-folder` is the parameter that will be passed by user in their commmand line which should points to their local `azure-cli-extensions` repo.
Please Note: this parameter `azure-cli-extension-folder` is only for Azure CLI extensions and if user are targeting generate the Azure CLI main repo modules, the parameter should be `azure-cli-folder` that points to their local `azure-cli` repo.
5) the `az-output-folder` is the specific output folder of this command modules. we should follow the basic code structure either in Azure CLI extensions or in Azure CLI main modules. If it is Azure CLI extensions that we are targeting, then the folder path should be like `$(azure-cli-extension-folder)/src/{serviceFolderName}`. If it's the Azure CLI main modules that we are targeting, then the folder path should be like `$(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/{serviceFolderName}`.
6) the `python-sdk-output-folder` is the vendored sdk path. Please Note that, even if we don't really generate the sdk, but we still need the folder path. It's worth notable that in the parts before and after vendored sdks are also configurable for specific user scenarios.
where:
1. the `extensions` means the name of the azure cli command modules,
2. the `namespace` means the python SDK namespace,
3. the `package-name` is the python SDK package name,
4. the `azure-cli-extension-folder` is the parameter that will be passed by user in their commmand line which should points to their local `azure-cli-extensions` repo.
Please Note: this parameter `azure-cli-extension-folder` is only for Azure CLI extensions and if user are targeting generate the Azure CLI main repo modules, the parameter should be `azure-cli-folder` that points to their local `azure-cli` repo.
5. the `az-output-folder` is the specific output folder of this command modules. we should follow the basic code structure either in Azure CLI extensions or in Azure CLI main modules. If it is Azure CLI extensions that we are targeting, then the folder path should be like `$(azure-cli-extension-folder)/src/{serviceFolderName}`. If it's the Azure CLI main modules that we are targeting, then the folder path should be like `$(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/{serviceFolderName}`.
6. the `python-sdk-output-folder` is the vendored sdk path. Please Note that, even if we don't really generate the sdk, but we still need the folder path. It's worth notable that in the parts before and after vendored sdks are also configurable for specific user scenarios.
* Please Note: it's better to add the yaml condition `$(target-mode) != 'core'` for generating cli extensions and `$(target-mode) == 'core'` for generating cli main modules. Make sure those configuration can only be accessed when wanted.

## Multi-api
Currently the Azure CLI code generator doesn't support multi-api which means each operation contained in one package should only contains one api-version's.
Expand Down