-
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.
Add new option, deprecate old one and make default valuable for examp…
…le directory (#1368) fix #1173 fix Azure/typespec-azure-pr#2754 --------- Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
- Loading branch information
1 parent
2d7c279
commit 3c0b50b
Showing
14 changed files
with
371 additions
and
210 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
.chronus/changes/new-option-examples-dir-2024-7-13-20-55-50.md
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,28 @@ | ||
--- | ||
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking | ||
changeKind: deprecation | ||
packages: | ||
- "@azure-tools/typespec-autorest" | ||
--- | ||
|
||
Replace `examples-directory` with `examples-dir` which will validate an absolute path is provided | ||
|
||
Case 1: Examples are in `examples` directory next to `tspconfig.yaml`. In this case the option can just be removed | ||
```diff | ||
- examples-directory: examples | ||
``` | ||
|
||
```diff | ||
- examples-directory: {project-root}/examples | ||
``` | ||
|
||
Case 2: Examples are in a different directory | ||
```diff | ||
- examples-directory: autorest-examples | ||
+ examples-dir: {project-root}/autorest-examples | ||
``` | ||
|
||
```diff | ||
- examples-directory: {project-root}/autorest-examples | ||
+ examples-dir: {project-root}/autorest-examples | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
emit: | ||
- "@azure-tools/typespec-autorest" | ||
options: | ||
"@azure-tools/typespec-autorest": | ||
examples-directory: "{project-root}/examples" |
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
Oops, something went wrong.