REST saga 1/3: Cleanup proto files, generate Swagger docs#4250
Conversation
|
|
||
| // ChainNotifier is a service that can be used to get information about the | ||
| // chain backend by registering notifiers for chain events. | ||
| service ChainNotifier { |
There was a problem hiding this comment.
nice, always wanted to do this 🧹
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "paths": { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Looks like they've only updated the swagger file once since it's been created: https://github.com/btcpayserver/BTCPayServer.Lightning/commits/121f70c10da523ef751058d5281196935a8c5c6f/src/BTCPayServer.Lightning.LND/LndSwaggerClient.cs
There was a problem hiding this comment.
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.
This is part 1 of 3 of the REST improvement saga which will ultimately replace #4141:
WalletUnlockerinto own file, generate Swagger docs for all RPCs, fix comment styles (replace///with//and/**with/*).grpc-gatewaycode to all subservers and updategrpc-gatewaylibrary.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.