Blockstream / electrs

An efficient re-implementation of Electrum Server in Rust
MIT License
320 stars 131 forks source link

OpenApi Definition for Electrs Rest Api #103

Open cjrutherford opened 2 months ago

cjrutherford commented 2 months ago

Fully validated requests with the exception of the broadcast and tx routes to post a transaction to the chain.

everything else has been documented with the correct shape of the response.

work on request body is dependent on testing of the broadcast and tx routes as mentioned above.

all other routes tested properly.

RCasatta commented 2 months ago

I like the OpenAPI spec, Ideally we should have some automatic way of checking it's in sync with the real API. This seem not quickly doable but IIRC you can build "tester web site " out of the spec, can we expose/have instruction to build it locally so that at least one can manual test it?

There is some naming confusion I would fix, like btcd instead of bitcoin in the file name (btcd recall a different software, the node written in go) and also a typo in the commit message (lnd instead of liquid)

philippem commented 2 months ago

I like the OpenAPI spec, Ideally we should have some automatic way of checking it's in sync with the real API. This seem not quickly doable but IIRC you can build "tester web site " out of the spec, can we expose/have instruction to build it locally so that at least one can manual test it?

There is some naming confusion I would fix, like btcd instead of bitcoin in the file name (btcd recall a different software, the node written in go) and also a typo in the commit message (lnd instead of liquid)

I like the OpenAPI spec, Ideally we should have some automatic way of checking it's in sync with the real API. This seem not quickly doable but IIRC you can build "tester web site " out of the spec, can we expose/have instruction to build it locally so that at least one can manual test it?

There is some naming confusion I would fix, like btcd instead of bitcoin in the file name (btcd recall a different software, the node written in go) and also a typo in the commit message (lnd instead of liquid)

we can do a validation with a generated client (e.g. https://openapi-generator.tech/)

cjrutherford commented 2 months ago

I like the OpenAPI spec, Ideally we should have some automatic way of checking it's in sync with the real API. This seem not quickly doable but IIRC you can build "tester web site " out of the spec, can we expose/have instruction to build it locally so that at least one can manual test it? There is some naming confusion I would fix, like btcd instead of bitcoin in the file name (btcd recall a different software, the node written in go) and also a typo in the commit message (lnd instead of liquid)

I like the OpenAPI spec, Ideally we should have some automatic way of checking it's in sync with the real API. This seem not quickly doable but IIRC you can build "tester web site " out of the spec, can we expose/have instruction to build it locally so that at least one can manual test it? There is some naming confusion I would fix, like btcd instead of bitcoin in the file name (btcd recall a different software, the node written in go) and also a typo in the commit message (lnd instead of liquid)

we can do a validation with a generated client (e.g. https://openapi-generator.tech/)

should I create a generated client and set it up to auto test?