Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(refunds): remove to schema from refund aggregate response and exclude it from open api documentation (#6405)

Tommy shu449c9cfe557b
diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json
index 0c46790260..4c1559fe09 100644
--- a/api-reference-v2/openapi_spec.json
+++ b/api-reference-v2/openapi_spec.json
@@ -17045,22 +17045,6 @@
}
}
},
- "RefundAggregateResponse": {
- "type": "object",
- "required": [
- "status_with_count"
- ],
- "properties": {
- "status_with_count": {
- "type": "object",
- "description": "The list of refund status with their count",
- "additionalProperties": {
- "type": "integer",
- "format": "int64"
- }
- }
- }
- },
"RefundErrorDetails": {
"type": "object",
"required": [
diff --git a/api-reference/openapi_spec.json b/api-reference/openapi_spec.json
index 9d92c28d55..f86664d459 100644
--- a/api-reference/openapi_spec.json
+++ b/api-reference/openapi_spec.json
@@ -21824,22 +21824,6 @@
}
}
},
- "RefundAggregateResponse": {
- "type": "object",
- "required": [
- "status_with_count"
- ],
- "properties": {
- "status_with_count": {
- "type": "object",
- "description": "The list of refund status with their count",
- "additionalProperties": {
- "type": "integer",
- "format": "int64"
- }
- }
- }
- },
"RefundListRequest": {
"allOf": [
{
diff --git a/crates/api_models/src/refunds.rs b/crates/api_models/src/refunds.rs
index f42eb8095b..ac5e5cb461 100644
--- a/crates/api_models/src/refunds.rs
+++ b/crates/api_models/src/refunds.rs
@@ -346,7 +346,7 @@ pub struct RefundListFilters {
pub refund_status: Vec<enums::RefundStatus>,
}
-#[derive(Clone, Debug, serde::Serialize, ToSchema)]
+#[derive(Clone, Debug, serde::Serialize)]
pub struct RefundAggregateResponse {
/// The list of refund status with their count
pub status_with_count: HashMap<enums::RefundStatus, i64>,
diff --git a/crates/openapi/src/openapi.rs b/crates/openapi/src/openapi.rs
index 1584566799..75d1bb9f27 100644
--- a/crates/openapi/src/openapi.rs
+++ b/crates/openapi/src/openapi.rs
@@ -491,7 +491,6 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payment_methods::PaymentMethodCollectLinkResponse,
api_models::refunds::RefundListRequest,
api_models::refunds::RefundListResponse,
- api_models::refunds::RefundAggregateResponse,
api_models::payments::AmountFilter,
api_models::mandates::MandateRevokedResponse,
api_models::mandates::MandateResponse,
diff --git a/crates/openapi/src/openapi_v2.rs b/crates/openapi/src/openapi_v2.rs
index dacaedd976..40f694b80a 100644
--- a/crates/openapi/src/openapi_v2.rs
+++ b/crates/openapi/src/openapi_v2.rs
@@ -433,7 +433,6 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payment_methods::PaymentMethodCollectLinkResponse,
api_models::refunds::RefundListRequest,
api_models::refunds::RefundListResponse,
- api_models::refunds::RefundAggregateResponse,
api_models::payments::AmountFilter,
api_models::mandates::MandateRevokedResponse,
api_models::mandates::MandateResponse,