-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
馃帹 Create CommonResourceMembers for code reuse
Creates `common.tsp` with `CommonResourceMembers` that resources spread for code reuse (model composition).
- Loading branch information
Showing
7 changed files
with
32 additions
and
48 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,14 @@ | ||
/** Members common across all (most) resources. */ | ||
model CommonResourceMembers { | ||
// Dev note: Use the spread syntax, not extends. This keeps the name internal. | ||
// https://microsoft.github.io/typespec/language-basics/models#model-composition | ||
|
||
/** The hypermedia URL of this resource. */ | ||
url: url; | ||
|
||
/** The ISO 8601 date format of the time that this resource was created. */ | ||
created: utcDateTime; | ||
|
||
/** The ISO 8601 date format of the time that this resource was edited. */ | ||
edited: utcDateTime; | ||
} |
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
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
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