diff --git a/controllers_v2/invoice.ctrl.go b/controllers_v2/invoice.ctrl.go index b595ad3..977802e 100644 --- a/controllers_v2/invoice.ctrl.go +++ b/controllers_v2/invoice.ctrl.go @@ -44,7 +44,7 @@ type Invoice struct { // @Description Returns a list of outgoing payments for a user // @Accept json // @Produce json -// @Tags Account +// @Tags Invoice // @Success 200 {object} []Invoice // @Failure 400 {object} responses.ErrorResponse // @Failure 500 {object} responses.ErrorResponse @@ -87,7 +87,7 @@ func (controller *InvoiceController) GetOutgoingInvoices(c echo.Context) error { // @Description Returns a list of incoming invoices for a user // @Accept json // @Produce json -// @Tags Account +// @Tags Invoice // @Success 200 {object} []Invoice // @Failure 400 {object} responses.ErrorResponse // @Failure 500 {object} responses.ErrorResponse @@ -184,7 +184,7 @@ func (controller *InvoiceController) AddInvoice(c echo.Context) error { // @Description Retrieve information about a specific invoice by payment hash // @Accept json // @Produce json -// @Tags Account +// @Tags Invoice // @Param payment_hash path string true "Payment hash" // @Success 200 {object} Invoice // @Failure 400 {object} responses.ErrorResponse diff --git a/docs/docs.go b/docs/docs.go index 4d28496..a89c936 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -175,7 +175,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "Account" + "Invoice" ], "summary": "Retrieve incoming invoices", "responses": { @@ -218,7 +218,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "Account" + "Invoice" ], "summary": "Retrieve outgoing payments", "responses": { @@ -261,7 +261,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "Account" + "Invoice" ], "summary": "Get a specific invoice", "parameters": [ @@ -490,7 +490,8 @@ const docTemplate = `{ ], "properties": { "amount": { - "type": "integer" + "type": "integer", + "minimum": 0 }, "description": { "type": "string" @@ -651,9 +652,6 @@ const docTemplate = `{ "fee": { "type": "integer" }, - "payment_error": { - "type": "string" - }, "payment_hash": { "type": "string" }, @@ -695,9 +693,6 @@ const docTemplate = `{ "fee": { "type": "integer" }, - "payment_error": { - "type": "string" - }, "payment_hash": { "type": "string" }, diff --git a/docs/swagger.json b/docs/swagger.json index 1f3ad19..06f1720 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -171,7 +171,7 @@ "application/json" ], "tags": [ - "Account" + "Invoice" ], "summary": "Retrieve incoming invoices", "responses": { @@ -214,7 +214,7 @@ "application/json" ], "tags": [ - "Account" + "Invoice" ], "summary": "Retrieve outgoing payments", "responses": { @@ -257,7 +257,7 @@ "application/json" ], "tags": [ - "Account" + "Invoice" ], "summary": "Get a specific invoice", "parameters": [ @@ -486,7 +486,8 @@ ], "properties": { "amount": { - "type": "integer" + "type": "integer", + "minimum": 0 }, "description": { "type": "string" @@ -647,9 +648,6 @@ "fee": { "type": "integer" }, - "payment_error": { - "type": "string" - }, "payment_hash": { "type": "string" }, @@ -691,9 +689,6 @@ "fee": { "type": "integer" }, - "payment_error": { - "type": "string" - }, "payment_hash": { "type": "string" }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 7d83b9d..6c451cd 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -28,6 +28,7 @@ definitions: v2controllers.AddInvoiceRequestBody: properties: amount: + minimum: 0 type: integer description: type: string @@ -135,8 +136,6 @@ definitions: type: string fee: type: integer - payment_error: - type: string payment_hash: type: string payment_preimage: @@ -164,8 +163,6 @@ definitions: type: string fee: type: integer - payment_error: - type: string payment_hash: type: string payment_preimage: @@ -302,7 +299,7 @@ paths: - OAuth2Password: [] summary: Get a specific invoice tags: - - Account + - Invoice /v2/invoices/incoming: get: consumes: @@ -329,7 +326,7 @@ paths: - OAuth2Password: [] summary: Retrieve incoming invoices tags: - - Account + - Invoice /v2/invoices/outgoing: get: consumes: @@ -356,7 +353,7 @@ paths: - OAuth2Password: [] summary: Retrieve outgoing payments tags: - - Account + - Invoice /v2/payments/bolt11: post: consumes: