invalid-api-version
@azure-tools/typespec-java/invalid-api-versionSeverity: error
This diagnostic is issued when the api-version emitter option is neither a declared service version nor latest or all.
Impact
Section titled “Impact”The requested API-version projection cannot be selected, so Java client generation fails.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”@service@versioned(Versions)namespace Contoso;
enum Versions { v1, v2,}options: "@azure-tools/typespec-java": api-version: v3Diagnostic Message
Section titled “Diagnostic Message”Invalid api-version option: 'v3'. The value should be an api-version, 'latest', or 'all'.✅ How to Fix
Section titled “✅ How to Fix”Use a version declared by the service, or use latest or all.
options: "@azure-tools/typespec-java": api-version: v2