payload-verification-valid-message-template
Overview
This rule belongs to the apimatic-codegen-validation ruleset and states that:
The messageTemplate field must only use supported placeholders. Webhook templates support {$request.body}, {$method}, {$request.header.<HeaderName>}, {$request.body#/property}. Callback templates support additional placeholders including {$url}, {$request.path}, {$request.query.<ParamName>}. If no value is specified, '{$request.body}' is used as the default.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Payload verification messageTemplate contains invalid placeholders. |
| Code | APIMATICCODEGEN_V530 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Webhooks |
| Products Impacted | Code Generation, Developer Experience Portal |
| Tags | apimatic code generation codegen sdks portal docs validation apimatic webhook callback payload verification message template template validation placeholders |
Suggested Fixes
- Use only supported placeholders for the respective type (webhook vs callback).
- Replace <HeaderName> with actual header name (for example {
$request.header.Authorization}). - Use JSON pointer syntax for body properties (for example {$request.body#/user/id}).
- Remove the
messageTemplatefield to use the default value '{$request.body}'. - Ensure all placeholders are properly formatted with curly braces.