Skip to content

Commit e7db9e0

Browse files
committed
address pr comments
1 parent 6c7414f commit e7db9e0

File tree

3 files changed

+37
-20
lines changed

3 files changed

+37
-20
lines changed

api-reference/openapi_spec.json

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,26 @@
958958
"summary": "Relay - Create",
959959
"description": "Creates a relay request.",
960960
"operationId": "Relay Request",
961+
"parameters": [
962+
{
963+
"name": "X-Profile-Id",
964+
"in": "header",
965+
"description": "Profile ID for authentication",
966+
"required": true,
967+
"schema": {
968+
"type": "string"
969+
}
970+
},
971+
{
972+
"name": "X-Idempotency-Key",
973+
"in": "header",
974+
"description": "Idempotency Key for relay request",
975+
"required": true,
976+
"schema": {
977+
"type": "string"
978+
}
979+
}
980+
],
961981
"requestBody": {
962982
"content": {
963983
"application/json": {
@@ -1014,9 +1034,9 @@
10141034
"operationId": "Retrieve a Relay details",
10151035
"parameters": [
10161036
{
1017-
"name": "id",
1018-
"in": "path",
1019-
"description": "The unique identifier for the Relay",
1037+
"name": "X-Profile-Id",
1038+
"in": "header",
1039+
"description": "Profile ID for authentication",
10201040
"required": true,
10211041
"schema": {
10221042
"type": "string"
@@ -23048,7 +23068,6 @@
2304823068
"required": [
2304923069
"connector_resource_id",
2305023070
"connector_id",
23051-
"profile_id",
2305223071
"type"
2305323072
],
2305423073
"properties": {
@@ -23062,11 +23081,6 @@
2306223081
"description": "Identifier of the connector ( merchant connector account ) to which relay request is being made",
2306323082
"example": "mca_5apGeP94tMts6rg3U3kR"
2306423083
},
23065-
"profile_id": {
23066-
"type": "string",
23067-
"description": "The business profile that is associated with this relay request",
23068-
"example": "pro_abcdefghijklmnopqrstuvwxyz"
23069-
},
2307023084
"type": {
2307123085
"$ref": "#/components/schemas/RelayType"
2307223086
},

crates/api_models/src/relay.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ pub struct RelayRequest {
1212
/// Identifier of the connector ( merchant connector account ) to which relay request is being made
1313
#[schema(example = "mca_5apGeP94tMts6rg3U3kR", value_type = String)]
1414
pub connector_id: common_utils::id_type::MerchantConnectorAccountId,
15-
/// The business profile that is associated with this relay request
16-
#[schema(example = "pro_abcdefghijklmnopqrstuvwxyz", value_type = String)]
17-
pub profile_id: common_utils::id_type::ProfileId,
1815
/// The type of relay request
1916
#[serde(rename = "type")]
2017
pub relay_type: RelayType,

crates/openapi/src/routes/relay.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
#[utoipa::path(
55
post,
66
path = "/relay",
7-
request_body (
7+
request_body(
88
content = RelayRequest,
9-
examples ((
10-
"Create a relay request" = (
11-
value = json!({
9+
examples((
10+
"Create a relay request" = (
11+
value = json!({
1212
"connector_resource_id": "7256228702616471803954",
1313
"connector_id": "mca_5apGeP94tMts6rg3U3kR",
1414
"profile_id": "pro_abcdefghijklmnopqrstuvwxyz",
@@ -17,14 +17,17 @@
1717
"amount": 6540,
1818
"currency": "USD"
1919
}
20-
})
21-
)
22-
))
20+
})
21+
)
22+
))
2323
),
2424
responses(
2525
(status = 200, description = "Relay request", body = RelayResponse),
2626
(status = 400, description = "Invalid data")
27-
27+
),
28+
params(
29+
("X-Profile-Id" = String, Header, description = "Profile ID for authentication"),
30+
("X-Idempotency-Key" = String, Header, description = "Idempotency Key for relay request")
2831
),
2932
tag = "Relay",
3033
operation_id = "Relay Request",
@@ -44,6 +47,9 @@ pub async fn relay() {}
4447
(status = 200, description = "Relay Retrieved", body = RelayResponse),
4548
(status = 404, description = "Relay details was not found")
4649
),
50+
params(
51+
("X-Profile-Id" = String, Header, description = "Profile ID for authentication")
52+
),
4753
tag = "Relay",
4854
operation_id = "Retrieve a Relay details",
4955
security(("api_key" = []), ("ephemeral_key" = []))

0 commit comments

Comments
 (0)