-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement scope negation for TCGC (#1783)
Resolves #1596 There are 2 formats of scope negation: ``` @clientName("A", "!(python, java)") Model foo ``` is equivalent to ``` @clientName("A", "!python, !java") Model foo ``` We allow combination of normal scope and negation scope for different scopes ``` @clientName("A", "!python, csharp") Model foo ``` Combination of same scope is also allowed ``` @clientName("A", "!python, python") Model foo ``` is equivalent to ``` @clientName("A", "!python") @clientName("A", "python") Model foo ``` and equivalent to ``` @clientName("A") Model foo ``` The rule for decorator override: - for the same scope, the later decorator value wins regardless it's defined with normal scope or scope negation Detailed override cases can be found in the tests of this PR.
- Loading branch information
Showing
8 changed files
with
463 additions
and
100 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,7 @@ | ||
--- | ||
changeKind: feature | ||
packages: | ||
- "@azure-tools/typespec-client-generator-core" | ||
--- | ||
|
||
Implement scope negation for TCGC decorators |
Large diffs are not rendered by default.
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
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.