Skip to content

REST saga 1/3: Cleanup proto files, generate Swagger docs#4250

Merged
Roasbeef merged 5 commits into
lightningnetwork:masterfrom
guggero:rest-1-cleanup
May 12, 2020
Merged

REST saga 1/3: Cleanup proto files, generate Swagger docs#4250
Roasbeef merged 5 commits into
lightningnetwork:masterfrom
guggero:rest-1-cleanup

Conversation

@guggero

@guggero guggero commented May 6, 2020

Copy link
Copy Markdown
Collaborator

This is part 1 of 3 of the REST improvement saga which will ultimately replace #4141:

This first part is by far the largest diff, but it's also the simplest one. It consists largely of changes in comment styles, movement of definitions and generated files.

@guggero guggero added enhancement Improvements to existing features / behaviour rpc Related to the RPC interface gRPC v0.11 labels May 6, 2020
@guggero guggero added this to the 0.11.0 milestone May 6, 2020
@guggero guggero requested a review from cfromknecht May 6, 2020 15:12

@cfromknecht cfromknecht left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🤘

Comment thread lnrpc/gen_protos.sh Outdated
Comment thread lnrpc/chainrpc/chainnotifier.swagger.json Outdated
Comment thread lnrpc/autopilotrpc/autopilot.proto Outdated
@guggero guggero requested a review from carlaKC May 8, 2020 11:53

@carlaKC carlaKC left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!


// ChainNotifier is a service that can be used to get information about the
// chain backend by registering notifiers for chain events.
service ChainNotifier {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, always wanted to do this 🧹

"produces": [
"application/json"
],
"paths": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think projects like BTCPay may depend on the fact that rn, there's only a single swagger file they need to consume in order to generate their HTTP client code. As a result, we either need to keep them as a single file, or notify the consumers, as this may essentially be a breaking change for them.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think things are OK, assuming they just keep that same generated code (like they have for the past two years). If it turns out to be an issue later, we can revert, and also flag their attention on this early.

@Roasbeef Roasbeef merged commit 36e8d1b into lightningnetwork:master May 12, 2020
@guggero guggero deleted the rest-1-cleanup branch May 12, 2020 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvements to existing features / behaviour gRPC rpc Related to the RPC interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants