Commit Graph

17 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
Manendra Pal Singh
4f2a137482 merged with latest main 2025-11-28 11:06:14 +05:30
ameersohel45
6e6b066b80 feat(router): Make domain field optional for Beckn Protocol v2.x.x 2025-11-24 12:48:23 +05:30
Manendra Pal Singh
8ef4904076 make changes as per the doc 2025-11-21 16:01:59 +05:30
Nirmal N R
e029ebe1f2 Unit tests for excludeAction
Added unit tests for the following:
- For target type URL:
    - ExcludeAction explicitly set true
    - ExcludeAction explicitly set to false
    - ExcludeAction omitted
- ExcludeAction when target type is BPP
- ExcludeAction when target type is BAP
- ExcludeAction when target type is Publisher
2025-09-24 12:16:20 +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
ec62a3242b resolved reqpreprocessing review comments
1. added logs for contextKey parsing and unmarshaling yml file.
2. resolved router test case issue.
2. resolved logger test case issues.
2025-04-06 17:09:59 +05:30
MohitKatare-protean
f3a3b5230f fixes as per the review comments 2025-04-04 16:12:37 +05:30
MohitKatare-protean
251457480e Resolved router test cases 2025-04-04 12:04:45 +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
0e22016a26 New test cases added 2025-03-20 13:37:55 +05:30
tanyamadaan
8cd3c80ced Router plugin 2025-03-19 22:48:50 +05:30