reorder-parameter-not-found
@azure-tools/typespec-client-generator-core/reorder-parameter-not-foundSeverity: error
This diagnostic is issued when reorderParameters includes a parameter name that does not exist on the operation.
Impact
Section titled “Impact”- Area: Client customization transformations. Blocks
reorderParametersbecause the order list names a parameter that the operation does not have. - Not affected: Existing operation parameters and their wire metadata are unchanged.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”@servicenamespace MyService { op myOp(a: string, b: string): void;}
alias Modified = reorderParameters(MyService.myOp, #["a", "missing"]); // `missing` is not a parameter of `myOp`Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
Parameter "missing" specified in reorder list not found in operation "myOp".✅ How to Fix
Section titled “✅ How to Fix”Remove the unknown name from the reorder list or add the parameter before reordering.
@servicenamespace MyService { op myOp(a: string, b: string): void;}
alias Modified = reorderParameters(MyService.myOp, #["b", "a"]);