From 545b8913c7c0c999c6ad33f66e7f066d260c387c Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Tue, 14 Nov 2023 17:56:37 -0800 Subject: [PATCH] lnrpc: fix watchtowerrpc doc tags to enable lncli api doc generation --- lnrpc/watchtowerrpc/watchtower.proto | 20 +++++++++++++++++++- lnrpc/watchtowerrpc/watchtower.swagger.json | 2 +- lnrpc/watchtowerrpc/watchtower_grpc.pb.go | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/lnrpc/watchtowerrpc/watchtower.proto b/lnrpc/watchtowerrpc/watchtower.proto index f3be62163..f4308d569 100644 --- a/lnrpc/watchtowerrpc/watchtower.proto +++ b/lnrpc/watchtowerrpc/watchtower.proto @@ -4,10 +4,28 @@ package watchtowerrpc; option go_package = "github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc"; +/* + * Comments in this file will be directly parsed into the API + * Documentation as descriptions of the associated method, message, or field. + * These descriptions should go right above the definition of the object, and + * can be in either block or // comment format. + * + * An RPC method can be matched to an lncli command by placing a line in the + * beginning of the description in exactly the following format: + * lncli: `methodname` + * + * Failure to specify the exact name of the command will cause documentation + * generation to fail. + * + * More information on how exactly the gRPC documentation is generated from + * this proto file can be found here: + * https://github.com/lightninglabs/lightning-api + */ + // Watchtower is a service that grants access to the watchtower server // functionality of the daemon. service Watchtower { - /* lncli: tower info + /* lncli: `tower info` GetInfo returns general information concerning the companion watchtower including its public key and URIs where the server is currently listening for clients. diff --git a/lnrpc/watchtowerrpc/watchtower.swagger.json b/lnrpc/watchtowerrpc/watchtower.swagger.json index 4c50729f7..702198972 100644 --- a/lnrpc/watchtowerrpc/watchtower.swagger.json +++ b/lnrpc/watchtowerrpc/watchtower.swagger.json @@ -18,7 +18,7 @@ "paths": { "/v2/watchtower/server": { "get": { - "summary": "lncli: tower info\nGetInfo returns general information concerning the companion watchtower\nincluding its public key and URIs where the server is currently\nlistening for clients.", + "summary": "lncli: `tower info`\nGetInfo returns general information concerning the companion watchtower\nincluding its public key and URIs where the server is currently\nlistening for clients.", "operationId": "Watchtower_GetInfo", "responses": { "200": { diff --git a/lnrpc/watchtowerrpc/watchtower_grpc.pb.go b/lnrpc/watchtowerrpc/watchtower_grpc.pb.go index 058745047..d948e58b5 100644 --- a/lnrpc/watchtowerrpc/watchtower_grpc.pb.go +++ b/lnrpc/watchtowerrpc/watchtower_grpc.pb.go @@ -18,7 +18,7 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type WatchtowerClient interface { - // lncli: tower info + // lncli: `tower info` // GetInfo returns general information concerning the companion watchtower // including its public key and URIs where the server is currently // listening for clients. @@ -46,7 +46,7 @@ func (c *watchtowerClient) GetInfo(ctx context.Context, in *GetInfoRequest, opts // All implementations must embed UnimplementedWatchtowerServer // for forward compatibility type WatchtowerServer interface { - // lncli: tower info + // lncli: `tower info` // GetInfo returns general information concerning the companion watchtower // including its public key and URIs where the server is currently // listening for clients.