invalid-access
@azure-tools/typespec-client-generator-core/invalid-accessSeverity: error
This diagnostic is issued when the value passed to the @access decorator is not one of the allowed access levels.
Impact
Section titled “Impact”- Area: SDK visibility overrides. Blocks the invalid
@accessvalue from changing generated public/internal visibility. - Not affected: Model structure, operation signatures, and wire payloads are unchanged.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”enum CustomAccess { private: "private",}@access(CustomAccess.private) // `"private"` is not a valid access valuemodel SecretModel {}Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
Access value must be "public" or "internal".✅ How to Fix
Section titled “✅ How to Fix”Pass Access.public or Access.internal to @access and remove any other enum member or literal value:
@access(Access.internal)model SecretModel {}