diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.invoices.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.invoices.json index ab56c1eda..a062ae2fb 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.invoices.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.invoices.json @@ -646,19 +646,16 @@ "description": "The link to the checkout page, where you can redirect the customer" }, "createdTime": { - "type": "number", - "format": "int64", - "description": "The creation time of the invoice" + "description": "The creation time of the invoice", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "expirationTime": { - "type": "number", - "format": "int64", - "description": "The expiration time of the invoice" + "description": "The expiration time of the invoice", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "monitoringTime": { - "type": "number", - "format": "int64", - "description": "The monitoring time of the invoice" + "description": "The monitoring time of the invoice", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "status": { "$ref": "#/components/schemas/InvoiceStatus", @@ -735,14 +732,15 @@ "description": "A specific set of payment methods to use for this invoice (ie. BTC, BTC-LightningNetwork). By default, select all payment methods activated in the store." }, "expirationMinutes": { - "type": "integer", "nullable": true, - "description": "The number of minutes after which an invoice becomes expired. Defaults to the store's settings. (The default store settings is 15)" + "description": "The number of minutes after which an invoice becomes expired. Defaults to the store's settings. (The default store settings is 15)", + "allOf": [ {"$ref": "#/components/schemas/TimeSpanMinutes"}] }, "monitoringMinutes": { "type": "integer", "nullable": true, - "description": "The number of minutes after an invoice expired after which we are still monitoring for incoming payments. Defaults to the store's settings. (The default store settings is 1440, 1 day)" + "description": "The number of minutes after an invoice expired after which we are still monitoring for incoming payments. Defaults to the store's settings. (The default store settings is 1440, 1 day)", + "allOf": [ {"$ref": "#/components/schemas/TimeSpanMinutes"}] }, "paymentTolerance": { "type": "number", @@ -851,9 +849,8 @@ "description": "A unique identifier for this payment" }, "receivedDate": { - "type": "string", - "format": "int64", - "description": "The date the payment was recorded" + "description": "The date the payment was recorded", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "value": { "type": "string", diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.json index 27c8ed039..5753d73e7 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.json @@ -48,6 +48,29 @@ "description": "User friendly error message about the error" } } + }, + "UnixTimestamp": { + "type": "number", + "format": "Unix timestamp in seconds", + "example": 1592312018, + "description": "A unix timestamp in seconds" + }, + + "TimeSpan": { + "type": "number", + "format": "int32", + "example": 90 + }, + "TimeSpanSeconds": { + "allOf": [ {"$ref": "#/components/schemas/TimeSpan"}], + + "format": "seconds", + "description": "A span of times in seconds" + }, + "TimeSpanMinutes": { + "allOf": [ {"$ref": "#/components/schemas/TimeSpan"}], + "format": "minutes", + "description": "A span of times in minutes" } }, "securitySchemes": { diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.lightning.common.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.lightning.common.json index cf0ebb2a4..c0cf48384 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.lightning.common.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.lightning.common.json @@ -26,8 +26,8 @@ "description": "Description of the invoice in the BOLT11" }, "expiry": { - "type": "integer", - "description": "Expiration time in seconds" + "description": "Expiration time in seconds", + "allOf": [ {"$ref": "#/components/schemas/TimeSpanSeconds"}] }, "privateRouteHints": { "type": "boolean", @@ -87,13 +87,13 @@ "nullable": false }, "paidAt": { - "type": "integer", "description": "The unix timestamp when the invoice got paid", - "nullable": true + "nullable": true, + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "expiresAt": { - "type": "integer", - "description": "The unix timestamp when the invoice expires" + "description": "The unix timestamp when the invoice expires", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "amount": { "type": "string", diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.notifications.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.notifications.json index d8825c502..b305304bb 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.notifications.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.notifications.json @@ -61,7 +61,7 @@ } ], "description": "View information about the specified notification", - "operationId": "Notifications_GetInvoice", + "operationId": "Notifications_GetNotification", "responses": { "200": { "description": "specified notification", @@ -218,9 +218,8 @@ "description": "The link of the notification" }, "createdTime": { - "type": "number", - "format": "int64", - "description": "The creation time of the notification" + "description": "The creation time of the notification", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "seen": { "type": "boolean", diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.payment-requests.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.payment-requests.json index 90dc62bee..e5eba1651 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.payment-requests.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.payment-requests.json @@ -296,10 +296,9 @@ "nullable": false }, "created": { - "type": "string", "description": "The creation date of the payment request", - "nullable": false, - "format": "int64" + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}], + "nullable": false } } }, @@ -339,10 +338,9 @@ "format": "html" }, "expiryDate": { - "type": "string", "description": "The expiry date of the payment request", "nullable": true, - "format": "int64" + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "embeddedCSS": { "type": "string", diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.pull-payments.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.pull-payments.json index 237690bdd..8b8cf6734 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.pull-payments.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.pull-payments.json @@ -83,15 +83,17 @@ }, "startsAt": { "type": "integer", + "format": "unix timestamp in seconds", "example": 1592312018, "nullable": true, - "description": "The unix timestamp when this pull payment is effective. Starts now if null or unspecified." + "description": "When this pull payment is effective. Already started if null or unspecified." }, "expiresAt": { "type": "integer", + "format": "unix timestamp in seconds", "example": 1593129600, "nullable": true, - "description": "The unix timestamp when this pull payment is expired. Never expires if null or unspecified." + "description": "When this pull payment expires. Never expires if null or unspecified." }, "paymentMethods": { "type": "array", diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-wallet.on-chain.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-wallet.on-chain.json index d7ea284e2..1b4598286 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-wallet.on-chain.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-wallet.on-chain.json @@ -540,9 +540,8 @@ "description": "The number of confirmations for this transaction" }, "timestamp": { - "type": "number", - "format": "int64", - "description": "The time of the transaction" + "description": "The time of the transaction", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "status": { "$ref": "#/components/schemas/TransactionStatus", diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores.json index 3dc3ae4df..7484c676e 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.stores.json @@ -284,20 +284,18 @@ "format": "url" }, "invoiceExpiration": { - "type": "integer", - "format": "int32", "default": 900, "minimum": 60, "maximum": 2073600, - "description": "The time after which an invoice is considered expired if not paid. The value will be rounded down to a minute." + "description": "The time after which an invoice is considered expired if not paid. The value will be rounded down to a minute.", + "allOf": [ {"$ref": "#/components/schemas/TimeSpanSeconds"}] }, "monitoringExpiration": { - "type": "integer", - "format": "int32", "default": 3600, "minimum": 600, "maximum": 2073600, - "description": "The time after which an invoice which has been paid but not confirmed will be considered invalid. The value will be rounded down to a minute." + "description": "The time after which an invoice which has been paid but not confirmed will be considered invalid. The value will be rounded down to a minute.", + "allOf": [ {"$ref": "#/components/schemas/TimeSpanSeconds"}] }, "speedPolicy": { "$ref": "#/components/schemas/SpeedPolicy" diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.users.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.users.json index a027c79cc..57764207d 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.users.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.users.json @@ -134,8 +134,9 @@ "description": "True if the email requires email confirmation to log in" }, "created": { - "type": "string", - "description": "The creation date of the user as a unix timestamp. Null if created before v1.0.5.6" + "nullable": true, + "description": "The creation date of the user as a unix timestamp. Null if created before v1.0.5.6", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "roles": { "type": "array", diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.json index 70a3ee787..4ad9943fb 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.webhooks.json @@ -481,10 +481,9 @@ "nullable": false }, "timestamp": { - "type": "number", - "format": "int64", "nullable": false, - "description": "Timestamp of when the delivery got broadcasted" + "description": "Timestamp of when the delivery got broadcasted", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] }, "httpCode": { "type": "number", @@ -616,9 +615,8 @@ "description": "The type of this event, current available are `InvoiceCreated`, `InvoiceReceivedPayment`, `InvoicePaidInFull`, `InvoiceExpired`, `InvoiceConfirmed`, and `InvoiceInvalid`." }, "timestamp": { - "type": "number", - "format": "int64", - "description": "The timestamp when this delivery has been created" + "description": "The timestamp when this delivery has been created", + "allOf": [ {"$ref": "#/components/schemas/UnixTimestamp"}] } } },