-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenApi Definition for Electrs Rest Api #103
base: new-index
Are you sure you want to change the base?
Conversation
21d85e5
to
5882ede
Compare
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 |
doc/electrs-rest-btcd-1.0.0.yaml
Outdated
tags: | ||
- block | ||
summary: Returns up to 25 transactions based on an optional starting index. | ||
description: Responses for this endpoint can be cached indefinitely. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments about similar description above
doc/electrs-rest-btcd-1.0.0.yaml
Outdated
summary: Merkle Inclusing Proof (Bitcoind merkleblock) | ||
description: | | ||
Returns a Merkle inclusion proof for the transaction using | ||
[bitcoind's merkelblock](https://bitcoin.org/en/glossary/merkle-block) format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link is 404
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it appears that the entire glossary section is gone looking into alternatives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found the right docs: https://btcinformation.org/en/glossary/merkle-block
doc/electrs-rest-btcd-1.0.0.yaml
Outdated
summary: Merkle Inclusing Proof (Bitcoind merkleblock) | ||
description: | | ||
Returns a Merkle inclusion proof for the transaction using | ||
[bitcoind's merkelblock](https://bitcoin.org/en/glossary/merkle-block) format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type "merkelblock"
doc/electrs-rest-btcd-1.0.0.yaml
Outdated
required: true | ||
schema: | ||
type: string | ||
responses: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this response content has been swapped for merkle-proof
.
The merkle-proof
resource is a hex string, whereas merkle-block-proof
is the electrumx object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swapped them around and confirmed response schemas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments above
we can do a validation with a generated client (e.g. https://openapi-generator.tech/) |
…or each BTC and LND fixed several typos and corrections based on review feedback. updated liquid version to match
should I create a generated client and set it up to auto test? |
542a3f9
to
ca9398c
Compare
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.