Skip to content

Commit

Permalink
fix(routing): Added query params
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak1799 committed Dec 5, 2023
1 parent 7401da3 commit df1ffa5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/router/src/routes/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ pub async fn routing_retrieve_config(
#[utoipa::path(
get,
path = "/routing",
params(
("limit" = Option<u16>, Query, description = "The number of records to be returned"),
("offset" = Option<u8>, Query, description = "The record offset from which to start gathering of results"),
("profile_id" = Option<String>, Query, description = "The unique identifier for a merchant profile"),
),
responses(
(status = 200, description = "Successfully fetched routing dictionary", body = RoutingKind),
(status = 500, description = "Internal server error"),
Expand Down Expand Up @@ -577,6 +582,9 @@ pub async fn retrieve_decision_manager_config(
#[utoipa::path(
get,
path = "/routing/active",
params(
("profile_id" = Option<String>, Query, description = "The unique identifier for a merchant profile"),
),
responses(
(status = 200, description = "Successfully retrieved active config", body = LinkedRoutingConfigRetrieveResponse),
(status = 500, description = "Internal server error"),
Expand Down
48 changes: 48 additions & 0 deletions openapi/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2484,6 +2484,42 @@
"Routing"
],
"operationId": "Retrieve routing dictionary",
"parameters": [
{
"name": "limit",
"in": "query",
"description": "The number of records to be returned",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"nullable": true,
"minimum": 0
}
},
{
"name": "offset",
"in": "query",
"description": "The record offset from which to start gathering of results",
"required": false,
"schema": {
"type": "integer",
"format": "int32",
"nullable": true,
"minimum": 0
}
},
{
"name": "profile_id",
"in": "query",
"description": "The unique identifier for a merchant profile",
"required": false,
"schema": {
"type": "string",
"nullable": true
}
}
],
"responses": {
"200": {
"description": "Successfully fetched routing dictionary",
Expand Down Expand Up @@ -2569,6 +2605,18 @@
"Routing"
],
"operationId": "Retrieve active config",
"parameters": [
{
"name": "profile_id",
"in": "query",
"description": "The unique identifier for a merchant profile",
"required": false,
"schema": {
"type": "string",
"nullable": true
}
}
],
"responses": {
"200": {
"description": "Successfully retrieved active config",
Expand Down

0 comments on commit df1ffa5

Please sign in to comment.