Commit Graph

11 Commits

Author SHA1 Message Date
Mayuresh
c2e357fd1e reverting changes from schemav2validator plugin 2026-03-25 20:15:51 +05:30
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
ameersohel45
3b59507f15 ref: improve error handling in extended schema validation 2025-12-14 23:07:58 +05:30
ameersohel45
5843d2a760 update: logs and comments also ref refreshLoop method 2025-12-12 17:21:02 +05:30
ameersohel45
5feb84196c ref: Split Extended Schema logic and rename variables 2025-12-12 17:21:02 +05:30
ameersohel45
5739573da0 ref: remove url transform config 2025-12-12 17:21:02 +05:30
ameersohel45
94943e63e6 Issue580-feat: add support for referenced schema validation and caching 2025-12-12 17:21:02 +05:30
ameersohel45
ab31e13e81 Issue 554 - refactor: improve error response format 2025-11-18 14:52:37 +05:30
ameersohel45
f9fac45106 Issue 552 - fix: optimized code creating in memory map for action to schema. 2025-11-18 02:25:04 +05:30
ameersohel45
75880a4458 543 - update: to use updated config structure 2025-11-14 13:06:31 +05:30
ameersohel45
2f8c888101 Issue 543 - feat: add new validator plugin 2025-11-14 00:45:29 +05:30