16 Commits

Author SHA1 Message Date
Mayuresh
72593d2ab6 fix(router): support camelCase context attributes (bppUri, bapUri) for beckn spec migration
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>
2026-03-25 15:41:16 +05:30
ameersohel45
6e6b066b80 feat(router): Make domain field optional for Beckn Protocol v2.x.x 2025-11-24 12:48:23 +05:30
Nirmal N R
c5edd7f572 feat(router): add excludeAction option for URL routing
- 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.
2025-09-19 17:12:17 +05:30
ameersohel45
afeffeefad chore: update import statements from beckn to beckn-one in beckn-onix 2025-09-15 22:58:23 +05:30
shreyvishal
7a0a78d43d Added: Bug Fixes 2025-06-25 16:30:47 +05:30
shreyvishal
c59db0c9d6 Revert "bug fixes" 2025-06-25 15:39:06 +05:30
shreyvishal
789fda2666 bug fixes 2025-06-23 06:55:54 +00:00
MohitKatare-protean
450f13cf34 updated code as per the review comments 2025-04-01 12:31:43 +05:30
MohitKatare-protean
2fe39a2c0a resolved linting issues 2025-03-31 23:16:26 +05:30
MohitKatare-protean
bbb1dbc843 Update on the review comments 2025-03-31 22:40:59 +05:30
MohitKatare-protean
244a7be7c1 temporary removed camelcase files for renaming 2025-03-30 16:45:50 +05:30
tanyamadaan
dff7a5abb3 Changes as per integration testing 2025-03-28 12:20:08 +05:30
tanyamadaan
a9ffe29a6e updated router 2025-03-27 11:28:45 +05:30
tanyamadaan
afcd17c125 Handling forward routing rules using routing plugin 2025-03-21 23:19:01 +05:30
tanyamadaan
fb1e948616 Removed debug logs 2025-03-20 13:42:32 +05:30
tanyamadaan
8cd3c80ced Router plugin 2025-03-19 22:48:50 +05:30