When defining or documenting APIs/plugins, ensure the declared contract matches how the system actually resolves requests and config fields. Validate examples and client expectations against these checks:
1) Route matching must cover the real request path
/prefix/suffix, don’t configure only /prefix; use /prefix/* (or the equivalent wildcard/prefix controller syntax).2) Request body/encoding must match extraction rules
$post_arg.<field>, the request must send form-style POST args (typically application/x-www-form-urlencoded).Example (consistent with $post_arg.tenant_id):
curl -i "http://127.0.0.1:9080/post" -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'tenant_id=000'
3) Keep API config field types aligned with upstream/integration contracts
string:string metadata).string|string[]) rather than silently mixing incompatible formats.4) Use the correct framework primitives/wiring
core.request.set_uri_args) rather than relying on side effects.Adopt this as a “pre-merge” checklist item for any API-facing documentation or examples: run through the exact request path and encoding, confirm the resolved variables/fields, and ensure the config schema types reflect the real integration contract.
Enter the URL of a public GitHub repository