Expand description
{param} substitution and *path connector-wildcard handling for
capability path templates.
Functions§
- encode_
path_ segment - Percent-encodes everything outside
[A-Za-z0-9._~-], matching RFC 3986’s unreserved set for a single path segment. - substitute_
path - Substitutes every
{key}placeholder intemplatewith the matching string/number/boolean field fromparams, and expands a trailing*pathwildcard segment (validated againstallowed_wildcard_prefixes). - validate_
connector_ path - Rejects a
*pathwildcard value unless it is an absolute, traversal-free path under one ofallowed_prefixes. This is the only user-influenced input that reaches the controller as a raw path segment rather than a query/body value, so it gets its own defense-in-depth check on top of whatever the controller itself enforces.