fix swagger

This commit is contained in:
kiwiidb
2022-05-18 12:16:24 +02:00
parent d01b9c492f
commit bc4655fe8c
4 changed files with 69 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ type KeySendResponseBody struct {
PaymentRoute *service.Route `json:"payment_route,omitempty"` PaymentRoute *service.Route `json:"payment_route,omitempty"`
} }
//// PayInvoice godoc //// KeySend godoc
// @Summary Make a keysend payment // @Summary Make a keysend payment
// @Description Pay a node without an invoice using it's public key // @Description Pay a node without an invoice using it's public key
// @Accept json // @Accept json

View File

@@ -816,6 +816,15 @@ const docTemplate = `{
"amt": { "amt": {
"type": "integer" "type": "integer"
}, },
"custom_records": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"description": { "description": {
"type": "string" "type": "string"
}, },
@@ -825,6 +834,9 @@ const docTemplate = `{
"ispaid": { "ispaid": {
"type": "boolean" "type": "boolean"
}, },
"keysend": {
"type": "boolean"
},
"pay_req": { "pay_req": {
"type": "string" "type": "string"
}, },
@@ -908,9 +920,21 @@ const docTemplate = `{
"controllers.OutgoingInvoice": { "controllers.OutgoingInvoice": {
"type": "object", "type": "object",
"properties": { "properties": {
"custom_records": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"fee": { "fee": {
"type": "integer" "type": "integer"
}, },
"keysend": {
"type": "boolean"
},
"memo": { "memo": {
"type": "string" "type": "string"
}, },
@@ -1025,7 +1049,7 @@ var SwaggerInfo = &swag.Spec{
Version: "0.6.1", Version: "0.6.1",
Host: "", Host: "",
BasePath: "/", BasePath: "/",
Schemes: []string{"http", "https"}, Schemes: []string{"https", "http"},
Title: "LNDhub.go", Title: "LNDhub.go",
Description: "Accounting wrapper for the Lightning Network providing separate accounts for end-users.", Description: "Accounting wrapper for the Lightning Network providing separate accounts for end-users.",
InfoInstanceName: "swagger", InfoInstanceName: "swagger",

View File

@@ -1,7 +1,7 @@
{ {
"schemes": [ "schemes": [
"http", "https",
"https" "http"
], ],
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
@@ -812,6 +812,15 @@
"amt": { "amt": {
"type": "integer" "type": "integer"
}, },
"custom_records": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"description": { "description": {
"type": "string" "type": "string"
}, },
@@ -821,6 +830,9 @@
"ispaid": { "ispaid": {
"type": "boolean" "type": "boolean"
}, },
"keysend": {
"type": "boolean"
},
"pay_req": { "pay_req": {
"type": "string" "type": "string"
}, },
@@ -904,9 +916,21 @@
"controllers.OutgoingInvoice": { "controllers.OutgoingInvoice": {
"type": "object", "type": "object",
"properties": { "properties": {
"custom_records": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"fee": { "fee": {
"type": "integer" "type": "integer"
}, },
"keysend": {
"type": "boolean"
},
"memo": { "memo": {
"type": "string" "type": "string"
}, },

View File

@@ -157,12 +157,20 @@ definitions:
properties: properties:
amt: amt:
type: integer type: integer
custom_records:
additionalProperties:
items:
type: integer
type: array
type: object
description: description:
type: string type: string
expire_time: expire_time:
type: integer type: integer
ispaid: ispaid:
type: boolean type: boolean
keysend:
type: boolean
pay_req: pay_req:
type: string type: string
payment_hash: {} payment_hash: {}
@@ -218,8 +226,16 @@ definitions:
type: object type: object
controllers.OutgoingInvoice: controllers.OutgoingInvoice:
properties: properties:
custom_records:
additionalProperties:
items:
type: integer
type: array
type: object
fee: fee:
type: integer type: integer
keysend:
type: boolean
memo: memo:
type: string type: string
payment_hash: {} payment_hash: {}
@@ -664,8 +680,8 @@ paths:
tags: tags:
- Payment - Payment
schemes: schemes:
- http
- https - https
- http
securityDefinitions: securityDefinitions:
OAuth2Password: OAuth2Password:
flow: password flow: password