mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-06 07:34:26 +01:00
Make dates/timespan swagger docs more clear (#2399)
* Make dates/tiemspan swagger docs more clear * fix schema conformity
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"}]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user