Replace fixed JSON struct tags for bpp_uri and bap_uri with a map-based parse of
the context object. A new getContextString() helper checks the snake_case key first
and falls back to the camelCase key, so routing works transparently for both the
legacy beckn spec and the new camelCase convention.
Also adds a nil-context guard so a missing context field returns a clear error
instead of a panic.
Test coverage:
- Two new cases in TestRouteSuccess for bppUri and bapUri camelCase payloads
- TestGetContextString: 5 table-driven cases covering snake, camel, precedence,
missing, and empty-snake-fallthrough scenarios
- TestRouteNilContext: confirms clear error on missing context field
Fixes#636
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add ExcludeAction field to target struct in routing configuration
- When excludeAction is true, skip appending action to URL path
- Provides flexibility for routing scenarios where action should not be part of URL path
- Maintains backward compatibility by defaulting to existing behavior
This change allows routing rules to be configured with excludeAction: true when the target URL should not have the action appended to its path.