diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs index b19f4d7b7db1..420725d8bca9 100644 --- a/crates/api_models/src/payments.rs +++ b/crates/api_models/src/payments.rs @@ -108,9 +108,9 @@ pub struct PaymentsRequest { // Makes the field mandatory in PaymentsCreateRequest pub amount: Option, - #[schema(value_type = Option, example = json!({ + #[schema(value_type = Option, example = json!({ "type": "single", - "data": "stripe" + "data": [{"connector": "stripe", "merchant_connector_id": "mca_123"}] }))] pub routing: Option, diff --git a/crates/api_models/src/routing.rs b/crates/api_models/src/routing.rs index fd1fe5943db8..0ac9246a3753 100644 --- a/crates/api_models/src/routing.rs +++ b/crates/api_models/src/routing.rs @@ -190,6 +190,7 @@ pub enum RoutableChoiceSerde { #[cfg_attr(not(feature = "connector_choice_bcompat"), derive(PartialEq, Eq))] pub struct RoutableConnectorChoice { #[cfg(feature = "connector_choice_bcompat")] + #[serde(skip)] pub choice_kind: RoutableChoiceKind, pub connector: RoutableConnectors, #[cfg(feature = "connector_choice_mca_id")] diff --git a/crates/euclid/src/frontend/ast.rs b/crates/euclid/src/frontend/ast.rs index 99495efd351e..949177923eec 100644 --- a/crates/euclid/src/frontend/ast.rs +++ b/crates/euclid/src/frontend/ast.rs @@ -163,6 +163,7 @@ pub struct Program { #[derive(Debug, Clone, Serialize, Deserialize, ToSchema)] pub struct RoutableConnectorChoice { #[cfg(feature = "connector_choice_bcompat")] + #[serde(skip)] pub choice_kind: RoutableChoiceKind, // pub connector: RoutableConnectors, #[cfg(feature = "connector_choice_mca_id")] diff --git a/openapi/openapi_spec.json b/openapi/openapi_spec.json index 93037a3a190b..5e3f91faf34c 100644 --- a/openapi/openapi_spec.json +++ b/openapi/openapi_spec.json @@ -8609,6 +8609,7 @@ "type": "object", "required": [ "id", + "profile_id", "name", "description", "algorithm", @@ -8619,6 +8620,9 @@ "id": { "type": "string" }, + "profile_id": { + "type": "string" + }, "name": { "type": "string" }, @@ -10307,7 +10311,7 @@ "routing": { "allOf": [ { - "$ref": "#/components/schemas/RoutingAlgorithm" + "$ref": "#/components/schemas/StraightThroughAlgorithm" } ], "nullable": true @@ -10677,7 +10681,7 @@ "routing": { "allOf": [ { - "$ref": "#/components/schemas/RoutingAlgorithm" + "$ref": "#/components/schemas/StraightThroughAlgorithm" } ], "nullable": true @@ -12763,17 +12767,13 @@ "RoutableConnectorChoice": { "type": "object", "required": [ - "choice_kind", "connector" ], "properties": { - "choice_kind": { - "$ref": "#/components/schemas/RoutableChoiceKind" - }, "connector": { "$ref": "#/components/schemas/RoutableConnectors" }, - "sub_label": { + "merchant_connector_id": { "type": "string", "nullable": true } @@ -12985,6 +12985,7 @@ "type": "object", "required": [ "id", + "profile_id", "name", "kind", "description", @@ -12995,6 +12996,9 @@ "id": { "type": "string" }, + "profile_id": { + "type": "string" + }, "name": { "type": "string" },