docs: improve lightning/get-balance documentation

closes #27
This commit is contained in:
Stefan Stammberger 2021-10-16 16:59:52 +02:00
parent 6ad707e3ea
commit 0acb332c65
No known key found for this signature in database
GPG key ID: 645FA807E935D9D5
2 changed files with 11 additions and 2 deletions

View file

@ -18,7 +18,11 @@ from app.repositories.lightning import (
send_coins,
send_payment,
)
from app.routers.lightning_docs import send_coins_desc, send_payment_desc
from app.routers.lightning_docs import (
get_balance_response_desc,
send_coins_desc,
send_payment_desc,
)
from fastapi import APIRouter, HTTPException, Query, status
from fastapi.params import Depends
@ -50,7 +54,7 @@ async def addinvoice(
"/get-balance",
name=f"{_PREFIX}.get-balance",
summary="Get the current on chain and channel balances of the lighting wallet.",
response_description="A JSON String with on chain wallet balances.",
response_description=get_balance_response_desc,
dependencies=[Depends(JWTBearer())],
response_model=WalletBalance,
)

View file

@ -1,3 +1,8 @@
get_balance_response_desc = """
A JSON String with on chain wallet balances with on-chain balances in
**sat** and channel balances in **msat**. Detailed description is in
the schema"""
send_coins_desc = """
__send-coins__ executes a request to send coins to a particular address.