replace-parameter-not-found
@azure-tools/typespec-client-generator-core/replace-parameter-not-foundSeverity: error
This diagnostic is issued when replaceParameter is called with a selector that does not match any parameter on the operation.
Impact
Section titled “Impact”- Area: Client customization transformations. Blocks
replaceParameterfrom producing the intended customized signature because the selector does not match an operation parameter. - Not affected: The original operation signature is unchanged.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”@servicenamespace MyService { op myOp(existingParam: string): void;}
model NewParams { replacement: int32;}alias Modified = replaceParameter(MyService.myOp, "missingParam", NewParams.replacement); // `missingParam` is not a parameter of `myOp`Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
Parameter "missingParam" not found in operation "myOp".✅ How to Fix
Section titled “✅ How to Fix”Use the exact name or model property reference for an existing operation parameter.
@servicenamespace MyService { op myOp(existingParam: string): void;}
model NewParams { replacement: int32;}alias Modified = replaceParameter(MyService.myOp, "existingParam", NewParams.replacement);