Skip to content

Commit

Permalink
Add how-to change provider namespace (#206)
Browse files Browse the repository at this point in the history
close #122
  • Loading branch information
timotheeguerin authored Feb 1, 2024
1 parent a1a2be7 commit 1129113
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/howtos/ARM/change-provider-namespace.md
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"
```

0 comments on commit 1129113

Please sign in to comment.