Open tadelesh opened 4 weeks ago
!
for negation!(java, csharp)
or !(java | csharp)
"!java, csharp"
- Use
!
for negation- When negate multiple scopes:
!(java, csharp)
or!(java | csharp)
- Since negation means excluding the defined scopes from the rest, we don't want to mix the negation usage with normal usages. So, it is illegal to write
"!java, csharp"
- If agreed with 3, we will store the negation scopes or the normal scopes into state
agree with 3. only allow !(java, chsarp)
another situation is setting one decorator multiple times. e.g.:
@clientName("B", "!csharp")
@clientName("A", "java")
model T {}
the result should be the later override the former: T for csharp, B for else.
Have we considered to avoid multiple usage of the same decorator? or we want to allow it for @clientName
?
Have we considered to avoid multiple usage of the same decorator? or we want to allow it for
@clientName
?
see discussion here: https://github.com/Azure/typespec-azure/pull/1606#discussion_r1778791173
Support scope like
!java
to represent all languages except java. Real use case could refer this: https://github.com/Azure/azure-rest-api-specs/blob/4883fa5dbf6f2c9093fac8ce334547e9dfac68fa/specification/batch/Azure.Batch/routes.tsp#L133.