Commit Graph

23 Commits

Author SHA1 Message Date
Mayuresh
1be757a165 fix(reqpreprocessor): support camelCase context attributes for beckn spec migration
- Add transactionId and messageId as camelCase aliases in model.go contextKeys map,
  pointing to the same ContextKeyTxnID and ContextKeyMsgID constants. This allows
  adapter configs to reference either form without failing startup validation.

- In reqpreprocessor, add firstNonNil() helper for subscriber/caller ID lookups
  so bap_id/bapId and bpp_id/bppId are both resolved correctly regardless of
  which beckn spec version the payload uses. snake_case takes precedence when both
  are present.

- Add snakeToCamel() helper used in the context key loop so a single config entry
  (e.g. transaction_id) automatically also checks the camelCase form (transactionId)
  without requiring any config file changes.

- Add TestSnakeToCamel, TestCamelCaseSubscriberID, TestCamelCaseContextKeys to
  cover all new code paths.

Fixes #637

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 15:40:36 +05:30
Manendra Pal Singh
9d57d3b8f1 Feat : Update PR as comment 2026-02-26 14:45:35 +05:30
Manendra Pal Singh
ab89102711 Feat: configure audit fields and metrics for onix adapter and add local configuration for onix adapterZ 2026-02-23 16:08:44 +05:30
Manendra Pal Singh
8948479dea Feat: Update the logger config to show the parent_id 2026-01-28 21:29:37 +05:30
ameersohel45
afeffeefad chore: update import statements from beckn to beckn-one in beckn-onix 2025-09-15 22:58:23 +05:30
mayur.popli
37a72d79a3 fix: context keys test case 2025-04-11 15:13:29 +05:30
mayur.popli
bd3a836bdb feat: added contextKeys and domain in schema error 2025-04-10 15:30:02 +05:30
MohitKatare-protean
e50dd96a34 Update reqpreprocessor.go 2025-04-09 08:21:32 +05:30
MohitKatare-protean
0f9ca0cd62 resolved linting issue 2025-04-08 16:35:50 +05:30
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
278e217c64 added const for contextKey 2025-04-04 16:15:16 +05:30
MohitKatare-protean
fc296b8ef3 code fix as per the review comments 2025-04-04 15:45:15 +05:30
MohitKatare-protean
49e460f61d fixed linting iessues 2025-04-04 14:59:40 +05:30
MohitKatare-protean
593b76427c resolved merge conflict 2025-04-04 12:48:36 +05:30
MohitKatare-protean
9c45c67492 Merge branch 'beckn-onix-v1.0-develop' of https://github.com/beckn/beckn-onix into feature/contex_id 2025-04-04 12:48:17 +05:30
tanyamadaan
1ae7a16461 fix in type 2025-04-04 11:06:54 +05:30
tanyamadaan
159ff956d3 Bug Fix for ReqPreProcessor plugin 2025-04-03 16:18:26 +05:30
tanyamadaan
87329bfb9d Bug Fix for ReqPreProcessor plugin 2025-04-03 16:08:57 +05:30
MohitKatare-protean
01588fc866 Added test case for the contextKeys 2025-04-03 15:17:02 +05:30
MohitKatare-protean
0ee2010338 change for the context keys 2025-04-03 12:35:13 +05:30
tanyamadaan
7ea369f3bb bug fix - request body not read properly 2025-04-02 13:26:12 +05:30
MohitKatare-protean
bbb1dbc843 Update on the review comments 2025-03-31 22:40:59 +05:30
MohitKatare-protean
f0e39e34e7 updated as per the review comments 2025-03-30 19:13:02 +05:30