swagger: split the Visa/Master tag and document payment-history in Turkmen
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

visa-master-payment-orders mixed order CRUD with the GBÜS payment flow;
they are now visa-master-orders and visa-master-payment. payment-history
summaries, descriptions and params are in Turkmen with one shape
(what it returns, Tertip, Bellik), and its tag description lists the
endpoints in the order they are used.

@securityDefinitions.apikey moves to the end of the general info block:
swag read every line after it as its attributes, so @schemes and all
@tag.* declarations were silently dropped from the spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 23:21:07 +05:00
parent 78e1976e53
commit d7e5d1f989
7 changed files with 377 additions and 198 deletions

View File

@@ -1,4 +1,7 @@
{
"schemes": [
"http"
],
"swagger": "2.0",
"info": {
"description": "Online payment system admin API. Localized fields ({en, ru, tm} objects) come back as a plain string in the language of the `lang` query parameter: tm, ru or en (default tm), falling back to tm, ru, en when that translation is empty. lang=all returns the full {en, ru, tm} objects (for edit forms); any other value is 400.",
@@ -6492,42 +6495,42 @@
"BearerAuth": []
}
],
"description": "Returns a paginated, branch-scoped audit trail of visa/master/sber payout attempts (paid, failed, or pending), across orders",
"description": "Ähli sargytlaryň Visa/Master we Sber töleg synanyşyklaryny (tölenen, şowsuz, garaşylýan) sahypalap gaýtarýar. Tertip: sort/order boýunça (adaty ýagdaýda iň täzesi birinji). Bellik: diňe ulanyjynyň öz şahamçasynyň tölegleri görünýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List payment history",
"summary": "Tölegleriň taryhy",
"parameters": [
{
"type": "integer",
"description": "Filter by order ID",
"description": "Sargyt ID-si boýunça süzmek",
"name": "order_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"description": "Şahamça ID-si boýunça süzmek",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by order owner (client) user ID",
"description": "Sargyt eýesiniň (müşderiniň) ulanyjy ID-si boýunça süzmek",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by gateway status (pending, success, failed)",
"description": "GBÜS statusy boýunça süzmek (pending, success, failed)",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "Filter by passport name/surname or order unique ID",
"description": "Pasport ady/familiýasy ýa-da sargydyň unique ID-si boýunça gözlemek",
"name": "search",
"in": "query"
},
@@ -6540,7 +6543,7 @@
],
"type": "string",
"default": "id",
"description": "Sort column",
"description": "Tertiplenýän sütün",
"name": "sort",
"in": "query"
},
@@ -6551,21 +6554,21 @@
],
"type": "string",
"default": "desc",
"description": "Sort direction",
"description": "Tertip ugry",
"name": "order",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"description": "Sahypa belgisi",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"description": "Bir sahypadaky ýazgy sany",
"name": "limit",
"in": "query"
},
@@ -6578,7 +6581,7 @@
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6612,18 +6615,18 @@
"BearerAuth": []
}
],
"description": "Returns one visa/master/sber payout attempt by its payment ID, with the raw GBÜS response - the detail view behind a payment-history list row",
"description": "Töleg ID-si boýunça bir Visa/Master ýa-da Sber töleg synanyşygyny GBÜS-iň soňky jogaby (gatewayResponse) bilen gaýtarýar. Tertip: ýeke ýazgy. Bellik: taryh sanawyndaky bir setiriň jikme-jik görnüşi.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Get a single payment attempt",
"summary": "Bir tölegiň jikme-jikligi",
"parameters": [
{
"type": "integer",
"description": "Payment ID",
"description": "Töleg ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6637,7 +6640,7 @@
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6683,18 +6686,18 @@
"BearerAuth": []
}
],
"description": "Returns every payment of one order, newest first, the way the per-order payment table shows them - paid or not, the card it was paid from (cardholderName/maskedPan, null until GBÜS reports them), its time (createdAt), payment year/month, amounts and reference (orderNumber) - each together with the last GBÜS (HALKBANK) response stored for it (gatewayResponse, null if GBÜS never answered). Backs the table's storage icon.",
"description": "Bir sargydyň ähli tölegini her biriniň GBÜS (HALKBANK) soňky jogaby (gatewayResponse) bilen gaýtarýar: tölendimi, haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt), töleg ýyly/aýy, mukdarlary we belgisi (orderNumber). Tertip: iň täzesi birinji. Bellik: GBÜS kart maglumatyny habar berýänçä cardholderName/maskedPan null, GBÜS asla jogap bermedik bolsa gatewayResponse null; tablisadaky ammar nyşany şu endpoint-den işleýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List an order's payments with their HALKBANK responses",
"summary": "Sargydyň tölegleri GBÜS jogaplary bilen",
"parameters": [
{
"type": "integer",
"description": "Order ID",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6708,7 +6711,7 @@
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6757,18 +6760,18 @@
"BearerAuth": []
}
],
"description": "Returns every visa/master/sber payout attempt of one order, newest first - one row per payment with whether it was paid (paid/gatewayStatus), the card it was paid from (cardholderName/maskedPan, once GBÜS reports them), its time (createdAt) and period (paymentPeriod). The raw GBÜS response of a row is at /payment-history/payments/{id}, of every row at once at /payment-history/{id}/gateway; the step-by-step logs are at /payment-history/{id}/logs.",
"description": "Bir sargydyň ähli Visa/Master we Sber töleg synanyşyklaryny gaýtarýar: her töleg üçin bir setir - tölendimi (paid/gatewayStatus), haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt) we döwri (paymentPeriod). Tertip: iň täzesi birinji. Bellik: bir tölegiň GBÜS jogaby /payment-history/payments/{id}, ähli tölegleriňki /payment-history/{id}/gateway, ädimme-ädim loglar /payment-history/{id}/logs salgysynda.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List an order's payments",
"summary": "Sargydyň tölegleri",
"parameters": [
{
"type": "integer",
"description": "Order ID",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6782,7 +6785,7 @@
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6831,18 +6834,18 @@
"BearerAuth": []
}
],
"description": "Returns every payment of one order, newest first, the way the per-order payment table shows them - paid or not, the card it was paid from (cardholderName/maskedPan, null until GBÜS reports them), its time (createdAt), payment year/month, amounts and reference (orderNumber) - each together with the last GBÜS (HALKBANK) response stored for it (gatewayResponse, null if GBÜS never answered). Backs the table's storage icon.",
"description": "Bir sargydyň ähli tölegini her biriniň GBÜS (HALKBANK) soňky jogaby (gatewayResponse) bilen gaýtarýar: tölendimi, haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt), töleg ýyly/aýy, mukdarlary we belgisi (orderNumber). Tertip: iň täzesi birinji. Bellik: GBÜS kart maglumatyny habar berýänçä cardholderName/maskedPan null, GBÜS asla jogap bermedik bolsa gatewayResponse null; tablisadaky ammar nyşany şu endpoint-den işleýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List an order's payments with their HALKBANK responses",
"summary": "Sargydyň tölegleri GBÜS jogaplary bilen",
"parameters": [
{
"type": "integer",
"description": "Order ID",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6856,7 +6859,7 @@
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6905,18 +6908,18 @@
"BearerAuth": []
}
],
"description": "Returns the full step-by-step audit trail (visa_master_payment_logs) recorded while processing an order's payout, newest first - evidence of what actually happened, independent of the summary rows returned by /payment-history/{id}",
"description": "Sargydyň tölegi işlenende ýazylan ähli ädimleri (visa_master_payment_logs) gaýtarýar. Tertip: iň täzesi birinji. Bellik: /payment-history/{id} setirlerinden garaşsyz, hakykatda näme bolandygynyň subutnamasy.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Get payment logs for an order",
"summary": "Sargydyň töleg loglary",
"parameters": [
{
"type": "integer",
"description": "Order ID",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6930,7 +6933,7 @@
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -9355,7 +9358,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "List visa/master payment orders",
"parameters": [
@@ -9458,7 +9461,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "Create visa/master payment order",
"parameters": [
@@ -9514,7 +9517,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-payment"
],
"summary": "GBÜS payment callback",
"parameters": [
@@ -9561,7 +9564,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "List sber payment orders",
"parameters": [
@@ -9657,7 +9660,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "Get visa/master payment order by ID",
"parameters": [
@@ -9723,7 +9726,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "Update visa/master payment order",
"parameters": [
@@ -9795,7 +9798,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "Delete visa/master payment order",
"parameters": [
@@ -9863,7 +9866,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-payment"
],
"summary": "Start a visa/master/sber payout",
"parameters": [
@@ -9937,7 +9940,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-payment"
],
"summary": "Quote a visa/master/sber payment",
"parameters": [
@@ -10002,7 +10005,7 @@
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-payment"
],
"summary": "Re-check a visa/master/sber order's latest payment attempt",
"parameters": [
@@ -13146,5 +13149,71 @@
"name": "Authorization",
"in": "header"
}
}
},
"tags": [
{
"description": "Authentication",
"name": "auth"
},
{
"description": "Provinces",
"name": "province"
},
{
"description": "Branches",
"name": "branches"
},
{
"description": "Payment cards",
"name": "payment-card"
},
{
"description": "Reason cards",
"name": "reason-card"
},
{
"description": "Loan types",
"name": "loan-type"
},
{
"description": "Loan required documents",
"name": "loan-document"
},
{
"description": "Loan repayments",
"name": "loans-repayment"
},
{
"description": "Card orders",
"name": "card-orders"
},
{
"description": "Card rekwizit (card details) orders",
"name": "card-rekwizit-orders"
},
{
"description": "User activity audit trail",
"name": "activity-logs"
},
{
"description": "Visa/Master and Sber student-transfer orders: list, view, create, edit, delete",
"name": "visa-master-orders"
},
{
"description": "Paying a Visa/Master or Sber order through GBÜS (HALKBANK): quote, pay, status re-check, bank callback",
"name": "visa-master-payment"
},
{
"description": "Visa/Master we Sber töleg synanyşyklarynyň taryhy. Ulanylyş tertibi: 1) GET /payment-history - ähli tölegler; 2) GET /payment-history/{id} - bir sargydyň tölegleri; 3) GET /payment-history/payments/{id} - bir tölegiň jikme-jikligi; 4) GET /payment-history/{id}/gateway - sargydyň tölegleri GBÜS jogaplary bilen; 5) GET /payment-history/{id}/logs - sargydyň ädimme-ädim töleg loglary",
"name": "payment-history"
},
{
"description": "Database SQL backups",
"name": "backups"
},
{
"description": "Currency exchange rates",
"name": "currencies"
}
]
}