`tsp-location` should support additional emitter options that overrides tspconfig.yaml
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 143
Description
In Java, we have a requirement to support generating two separate flavors of libraries (`Azure` and `AzureV2`) from the same spec. Currently, the `tspconfig.yaml` file in `azure-rest-api-specs` repo can only set one flavor. However, in `azure-sdk-for-java`, we will have 2 separate directories that require generating 2 different flavors.
For example:
Key Vault (`Azure` flavor)- https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/keyvault/azure-security-keyvault-keys/tsp-location.yaml
Key Vault 2 (`AzureV2` flavor) - https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/keyvault-v2/azure-security-keyvault-keys/tsp-location.yaml
The contents of both `tsp-location.yaml` files are identical and `tsp-client` has no way to know that we need 2 different flavors. By introducing additional emitter options in `tsp-location.yaml`, we can override the `flavor` option to indicate one is for `AzureV2` flavor and the other is for `Azure` flavor. This option should be used by `tsp-client` at the time of code generation.
Contributor guide
Assessment
This issue has not been assessed yet.