missing-scope
@azure-tools/typespec-client-generator-core/missing-scopeSeverity: error
This diagnostic is issued when a decorator that is likely language-specific is used without a language scope; currently this is reported for external @alternateType metadata without a scope.
Impact
Section titled “Impact”- Area: Language-specific alternate-type customization. Blocks external type metadata that lacks a target emitter scope, preventing it from being applied globally by accident.
- Not affected: The TypeSpec type definition and service payload schema are unchanged.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”@alternateType({ // external alternate type is missing a language scope identity: "pystac.Collection",
package: "pystac", minVersion: "1.13.0",})model ItemCollection {}Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
@scope decorator should be applied with @alternateType since it is highly likely this is language-specific✅ How to Fix
Section titled “✅ How to Fix”Provide the appropriate language scope argument, such as "python", "csharp", or another emitter scope:
@alternateType( { identity: "pystac.Collection", package: "pystac", minVersion: "1.13.0", }, "python")model ItemCollection {}