You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
Repository: juspay/hyperswitch
Working directory: ./repos/hyperswitch_pool_9 (already cloned)
Base commit: aae1994ea147fa1ebdc9555f00b072bb9ed57abc
Task ID: juspay__hyperswitch-8971
Version: v1.116.0
TASK DESCRIPTION:
Bug: refactor(routing): receive json value instead of string
DETAILED CONTEXT & HINTS:
Type of Change
Bugfix
New feature
Enhancement
Refactoring
Dependency updates
Documentation
CI/CD
Description
Refactoring to recieve json response instead of string
Updated ConfigApiClient::send_decision_engine_request calls in crates/router/src/core/routing/helpers.rs to return serde_json::Value instead of String.
This ensures the response is parsed as JSON for better type safety and avoids manual string-to-JSON conversions in downstream logic.
Changes Made
Replaced generic type parameter String with serde_json::Value in the following functions:
enable_decision_engine_dynamic_routing_setup
update_decision_engine_dynamic_routing_setup
disable_decision_engine_dynamic_routing_setup
create_decision_engine_merchant
delete_decision_engine_merchant
Purpose
Switching to serde_json::Value directly improves clarity, reduces redundant parsing, and enforces better response handling.
I'll help you implement this refactoring task to change the ConfigApiClient::send_decision_engine_request calls to return serde_json::Value instead of String. Let me start by understanding the current codebase structure and locating the relevant files.
Assistant
(no content)
Assistant
I'll work on this refactoring task to change ConfigApiClient::send_decision_engine_request calls to return serde_json::Value instead of String. Let me start by exploring the codebase to find the relevant files.
Assistant
Now let me read this file to understand the current implementation:
Assistant
Let me search for the ConfigApiClient and the specific functions mentioned in the task:
Assistant
Let me search more specifically for the functions mentioned in the task:
Assistant
Let me search for the send_decision_engine_request function specifically:
Assistant
Let me examine the file more carefully to find the relevant functions. Since the file is quite large, I'll look at a specific section:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.