Fix swagger (#5380)

This commit is contained in:
A. I. Oleynikov 2023-10-10 02:15:07 -03:00 committed by GitHub
parent ef03497350
commit 9e76b4d28e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 66 additions and 34 deletions

View File

@ -788,11 +788,17 @@
}, },
"depositablePaymentMethods": { "depositablePaymentMethods": {
"type": "array", "type": "array",
"items": {
"type": "string"
},
"description": "A list of payment methods (crypto code + network) you can deposit to the custodian.", "description": "A list of payment methods (crypto code + network) you can deposit to the custodian.",
"nullable": false "nullable": false
}, },
"withdrawablePaymentMethods": { "withdrawablePaymentMethods": {
"type": "array", "type": "array",
"items": {
"type": "string"
},
"description": "A list of payment methods (crypto code + network) you can withdraw from the custodian.", "description": "A list of payment methods (crypto code + network) you can withdraw from the custodian.",
"nullable": false "nullable": false
}, },

View File

@ -793,7 +793,11 @@
"status": { "status": {
"nullable": false, "nullable": false,
"description": "Mark an invoice as completed or invalid.", "description": "Mark an invoice as completed or invalid.",
"$ref": "#/components/schemas/InvoiceStatusMark" "allOf": [
{
"$ref": "#/components/schemas/InvoiceStatusMark"
}
]
} }
} }
}, },
@ -811,7 +815,7 @@
}, },
"InvoiceStatus": { "InvoiceStatus": {
"type": "string", "type": "string",
"description": "", "description": "The status of the invoice",
"x-enumNames": [ "x-enumNames": [
"New", "New",
"Processing", "Processing",
@ -854,13 +858,21 @@
}, },
"checkout": { "checkout": {
"nullable": true, "nullable": true,
"$ref": "#/components/schemas/CheckoutOptions", "description": "Additional settings to customize the checkout flow",
"description": "Additional settings to customize the checkout flow" "allOf": [
{
"$ref": "#/components/schemas/CheckoutOptions"
}
]
}, },
"receipt": { "receipt": {
"nullable": true, "nullable": true,
"$ref": "#/components/schemas/ReceiptOptions", "description": "Additional settings to customize the public receipt",
"description": "Additional settings to customize the public receipt" "allOf": [
{
"$ref": "#/components/schemas/ReceiptOptions"
}
]
} }
} }
}, },
@ -893,8 +905,7 @@
"example": "USD" "example": "USD"
}, },
"type": { "type": {
"$ref": "#/components/schemas/InvoiceType", "$ref": "#/components/schemas/InvoiceType"
"description": "The type of invoice"
}, },
"checkoutLink": { "checkoutLink": {
"type": "string", "type": "string",
@ -925,12 +936,10 @@
] ]
}, },
"status": { "status": {
"$ref": "#/components/schemas/InvoiceStatus", "$ref": "#/components/schemas/InvoiceStatus"
"description": "The status of the invoice"
}, },
"additionalStatus": { "additionalStatus": {
"$ref": "#/components/schemas/InvoiceAdditionalStatus", "$ref": "#/components/schemas/InvoiceAdditionalStatus"
"description": "a secondary status of the invoice"
}, },
"availableStatusesForManualMarking": { "availableStatusesForManualMarking": {
"type": "array", "type": "array",
@ -1167,8 +1176,11 @@
"properties": { "properties": {
"speedPolicy": { "speedPolicy": {
"nullable": true, "nullable": true,
"$ref": "#/components/schemas/SpeedPolicy", "allOf": [
"description": "This is a risk mitigation parameter for the merchant to configure how they want to fulfill orders depending on the number of block confirmations for the transaction made by the consumer on the selected cryptocurrency" {
"$ref": "#/components/schemas/SpeedPolicy"
}
]
}, },
"paymentMethods": { "paymentMethods": {
"type": "array", "type": "array",
@ -1239,11 +1251,8 @@
"description": "`\"V1\"`: The original checkout form \n`\"V2\"`: The new experimental checkout form. \nIf `null` or unspecified, the store's settings will be used.", "description": "`\"V1\"`: The original checkout form \n`\"V2\"`: The new experimental checkout form. \nIf `null` or unspecified, the store's settings will be used.",
"nullable": true, "nullable": true,
"default": null, "default": null,
"x-enumNames": [
"V1",
"V2"
],
"enum": [ "enum": [
null,
"V1", "V1",
"V2" "V2"
] ]
@ -1398,8 +1407,7 @@
"description": "The fee paid for the payment" "description": "The fee paid for the payment"
}, },
"status": { "status": {
"$ref": "#/components/schemas/PaymentStatus", "$ref": "#/components/schemas/PaymentStatus"
"description": "The status of the payment"
}, },
"destination": { "destination": {
"type": "string", "type": "string",
@ -1409,7 +1417,7 @@
}, },
"PaymentStatus": { "PaymentStatus": {
"type": "string", "type": "string",
"description": "", "description": "The status of the payment",
"x-enumNames": [ "x-enumNames": [
"Invalid", "Invalid",
"Processing", "Processing",
@ -1423,7 +1431,7 @@
}, },
"InvoiceType": { "InvoiceType": {
"type": "string", "type": "string",
"description": "", "description": "The type of the invoice",
"x-enumNames": [ "x-enumNames": [
"Standard", "Standard",
"TopUp" "TopUp"

View File

@ -65,7 +65,7 @@
}, },
"SpeedPolicy": { "SpeedPolicy": {
"type": "string", "type": "string",
"description": "`\"HighSpeed\"`: 0 confirmations (1 confirmation if RBF enabled in transaction) \n`\"MediumSpeed\"`: 1 confirmation \n`\"LowMediumSpeed\"`: 2 confirmations \n`\"LowSpeed\"`: 6 confirmations\n", "description": "This is a risk mitigation parameter for the merchant to configure how they want to fulfill orders depending on the number of block confirmations for the transaction made by the consumer on the selected cryptocurrency.\n`\"HighSpeed\"`: 0 confirmations (1 confirmation if RBF enabled in transaction) \n`\"MediumSpeed\"`: 1 confirmation \n`\"LowMediumSpeed\"`: 2 confirmations \n`\"LowSpeed\"`: 6 confirmations\n",
"x-enumNames": [ "x-enumNames": [
"HighSpeed", "HighSpeed",
"MediumSpeed", "MediumSpeed",

View File

@ -250,16 +250,22 @@
"type": "object", "type": "object",
"properties": { "properties": {
"onchain": { "onchain": {
"type": "object",
"description": "On-chain balance of the Lightning node", "description": "On-chain balance of the Lightning node",
"nullable": true, "nullable": true,
"$ref": "#/components/schemas/OnchainBalanceData" "allOf": [
{
"$ref": "#/components/schemas/OnchainBalanceData"
}
]
}, },
"offchain": { "offchain": {
"type": "object",
"description": "Off-chain balance of the Lightning node", "description": "Off-chain balance of the Lightning node",
"nullable": true, "nullable": true,
"$ref": "#/components/schemas/OffchainBalanceData" "allOf": [
{
"$ref": "#/components/schemas/OffchainBalanceData"
}
]
} }
} }
}, },

View File

@ -301,6 +301,7 @@
"schema": { "type": "string" } "schema": { "type": "string" }
} }
], ],
"operationId": "PaymentRequests_Pay",
"description": "Create a new invoice for the payment request, or reuse an existing one", "description": "Create a new invoice for the payment request, or reuse an existing one",
"requestBody": { "requestBody": {
"description": "Invoice creation request", "description": "Invoice creation request",

View File

@ -133,7 +133,7 @@
} }
}, },
{ {
"name": "userId", "name": "idOrEmail",
"in": "path", "in": "path",
"required": true, "required": true,
"description": "The user's id or email", "description": "The user's id or email",

View File

@ -695,7 +695,6 @@
}, },
"TransactionStatus": { "TransactionStatus": {
"type": "string", "type": "string",
"description": "",
"x-enumNames": [ "x-enumNames": [
"Unconfirmed", "Unconfirmed",
"Confirmed" "Confirmed"
@ -758,8 +757,12 @@
"allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}]
}, },
"status": { "status": {
"$ref": "#/components/schemas/TransactionStatus", "allOf": [
"description": "The status for this transaction" {
"$ref": "#/components/schemas/TransactionStatus"
}
],
"description": "The status of this transaction"
}, },
"labels": { "labels": {
"description": "Labels linked to this transaction", "description": "Labels linked to this transaction",

View File

@ -477,8 +477,12 @@
}, },
"receipt": { "receipt": {
"nullable": true, "nullable": true,
"$ref": "#/components/schemas/ReceiptOptions", "description": "Additional settings to customize the public receipt",
"description": "Additional settings to customize the public receipt" "allOf": [
{
"$ref": "#/components/schemas/ReceiptOptions"
}
]
}, },
"lightningAmountInSatoshi": { "lightningAmountInSatoshi": {
"type": "boolean", "type": "boolean",

View File

@ -790,7 +790,11 @@
}, },
"payment": { "payment": {
"description": "Details about the payment", "description": "Details about the payment",
"$ref": "#/components/schemas/Payment" "allOf": [
{
"$ref": "#/components/schemas/Payment"
}
]
} }
} }
} }