add getinvoice endpoint

This commit is contained in:
kiwiidb
2022-06-17 15:44:54 +02:00
parent b256a3fefe
commit adba6d3006
4 changed files with 169 additions and 1 deletions

View File

@@ -246,6 +246,55 @@ const docTemplate = `{
}
}
},
"/v2/invoices/{payment_hash}": {
"get": {
"security": [
{
"OAuth2Password": []
}
],
"description": "Retrieve information about a specific invoice by payment hash",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Account"
],
"summary": "Get a specific invoice",
"parameters": [
{
"type": "string",
"description": "Payment hash",
"name": "payment_hash",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v2controllers.Invoice"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse"
}
}
}
}
},
"/v2/payments/bolt11": {
"post": {
"security": [