-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20f7be7
commit 5fdddad
Showing
8 changed files
with
137 additions
and
95 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
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
27 changes: 0 additions & 27 deletions
27
docs/libraries/azure-resource-manager/rules/avoid-additional-properties.md
This file was deleted.
Oops, something went wrong.
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,67 @@ | ||
--- | ||
title: no-record | ||
--- | ||
|
||
```text title=- Full name- | ||
@azure-tools/typespec-azure-resource-manager/no-record | ||
``` | ||
|
||
ARM requires Resource provider teams to define types explicitly. This is to ensure good customer experience in terms of the discoverability of concrete type definitions. | ||
|
||
#### ❌ Incorrect | ||
|
||
```tsp | ||
model Address extends Record<string> {} | ||
``` | ||
|
||
#### ✅ Correct | ||
|
||
```tsp | ||
model Address { | ||
street: string; | ||
city: string; | ||
state: string; | ||
country: string; | ||
postalCode: string; | ||
} | ||
``` | ||
|
||
#### ❌ Incorrect | ||
|
||
```tsp | ||
model Address { | ||
address: Record<string>; | ||
city: string; | ||
state: string; | ||
} | ||
``` | ||
|
||
#### ✅ Correct | ||
|
||
```tsp | ||
model Address { | ||
street: string; | ||
city: string; | ||
state: string; | ||
country: string; | ||
postalCode: string; | ||
} | ||
``` | ||
|
||
#### ❌ Incorrect | ||
|
||
```tsp | ||
model Address is Record<string>; | ||
``` | ||
|
||
#### ✅ Correct | ||
|
||
```tsp | ||
model Address { | ||
street: string; | ||
city: string; | ||
state: string; | ||
country: string; | ||
postalCode: string; | ||
} | ||
``` |
Oops, something went wrong.