-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add how-to change provider namespace (#206)
close #122
- Loading branch information
1 parent
a1a2be7
commit 1129113
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Change the provider namespace | ||
|
||
If you want to have a different provider namespace than the TypeSpec namespec you'll have to change the following | ||
|
||
## 1. Change the name in the spec | ||
|
||
```tsp | ||
@armProviderNamespace("MyDifferent.ProviderName") | ||
namespace Microsoft.Contoso { | ||
} | ||
``` | ||
|
||
## 2. Change the output configuration | ||
|
||
If you want to match the folder structure of the azure-specs repo you might have to replace the `{service-name}` interpolation with the name you changed. | ||
|
||
```diff | ||
options: | ||
'@azure-tools/typespec-autorest': | ||
# ... other options | ||
- output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/xxx.json" | ||
+ output-file: "{azure-resource-provider-folder}/MyDifferent.ProviderName/{version-status}/{version}/xxx.json" | ||
``` |